Hey guys, I am basically doing a post request with...
# announcements
m
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
#C0A974TJ9
e
Use
HttpResponse.receive<YOUR_RECEIVE_TYPE>()
Keep in mind that you need to install a JSON deserializer on the client first
a
If you need the body as String, there also is response.readText()
m
Yeah made it with response.readText() thanks tho 😊