body

open suspend override fun body(): String

Gets the response body as a string.

This method reads the entire response body from the Ktor response and returns it as a UTF-8 encoded string. This is a suspend function because reading the body may involve I/O operations.

Return

The response body as a string.

Throws

if the body cannot be read or decoded.