body

abstract suspend fun body(): String

Gets the response body as a string.

This is a suspend function that reads the entire response body and returns it as a UTF-8 encoded string. For large responses, consider streaming or chunked reading if available in the underlying implementation.

Return

The response body as a string.

Throws

if the body cannot be read or decoded.