Hey. Using the following code I can see the lines about request body in the log:
Copy code
2022-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
Aleksei Tirman [JB]
01/26/2022, 10:47 AM
Copy code
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)
}