api.get<DynamicMutableList>(api.target("https://server.com/path/to/someObjects"))
api.post<Order>(api.target("https://server.com/orders"), order,
/* optional headers */
mapOf(
"x-header1" to "value1",
"x-header2" to "value2"
)
)
api.get<StringMutableList>(api.target("https://repository.promethist.ai/data/animals.json"))
api.words(word, type)
api.words<ResponseType>(word, type = "")
api.words("good", "antonyms")
api.words<Dynamic>("hatchback")<List<PropertyMap>>("results") {
value.forEach {
println("partOfSpeech = " + it["partOfSpeech"])
if (it.containsKey("synonyms")) {
println("synonyms:")
(it["synonyms"] as List<String>).forEach {
println("- $it")
}
}
}
}