mantono
07/03/2018, 12:01 PMCan Orhan
07/03/2018, 12:05 PMmantono
07/03/2018, 12:07 PMLucas Ł
07/03/2018, 12:12 PMjlleitschuh
07/03/2018, 3:37 PMmantono
07/03/2018, 3:39 PMjlleitschuh
07/03/2018, 3:40 PMmantono
07/03/2018, 3:43 PMmantono
07/03/2018, 4:04 PMprivate suspend inline fun <reified T> httpPost(url: String, payload: Any): T {
return <http://client.post|client.post>(url = url) {
header("Authorization", "Bearer $apiToken")
contentType(ContentType.Application.Json)
accept(ContentType.Application.Json)
body = jsonString(payload)
}
}
jlleitschuh
07/03/2018, 4:06 PMmantono
07/03/2018, 4:06 PMmantono
07/03/2018, 4:06 PMjlleitschuh
07/03/2018, 4:07 PMinstall(JsonFeature)
install(HttpPlainText) {
defaultCharset = Charsets.UTF_8
}
At least, I thought I did.