Hey guys, I am basically doing a post request with ktor httpClient and I get back a HttpResponse successfully. With that I can see the response status and headers but I cannot see the body. How can I find the body?
l
LeoColman
11/21/2019, 5:11 PM
#C0A974TJ9
e
Evan R.
11/21/2019, 8:15 PM
Use
HttpResponse.receive<YOUR_RECEIVE_TYPE>()
Evan R.
11/21/2019, 8:15 PM
Keep in mind that you need to install a JSON deserializer on the client first
a
Andreas Jost
11/22/2019, 8:08 AM
If you need the body as String, there also is response.readText()
m
Matthias R
11/22/2019, 6:54 PM
Yeah made it with response.readText() thanks tho 😊