brabo-hi
01/25/2022, 11:42 PMrequest Body
?HttpClient {
install(Logging) {
level = LogLevel.ALL
}
}
It is printing response Body
not request body
Aleksei Tirman [JB]
01/26/2022, 10:46 AM2022-01-26 13:45:54.467 [main] INFO io.ktor.client.HttpClient - BODY START
2022-01-26 13:45:54.467 [main] INFO io.ktor.client.HttpClient - My Body
2022-01-26 13:45:54.467 [main] INFO io.ktor.client.HttpClient - BODY END
suspend fun main(): Unit = coroutineScope {
val client = HttpClient(Apache) {
install(Logging) {
level = LogLevel.ALL
}
}
val r = <http://client.post|client.post><String>("<https://httpbin.org/post>") {
body = "My Body"
}
println(r)
}
brabo-hi
01/26/2022, 7:46 PM