Package io.ktor.client.response

Types

HttpResponse

class HttpResponse : CoroutineScope, HttpMessage

Functions

discardRemaining

suspend fun HttpResponse.discardRemaining(): Unit

Efficiently discards the remaining bytes of HttpResponse.content.

readBytes

suspend fun HttpResponse.readBytes(count: Int): ByteArray

Exactly reads count bytes of the HttpResponse.content.

suspend fun HttpResponse.readBytes(): ByteArray

Reads the whole HttpResponse.content if Content-Length was specified. Otherwise it just reads one byte.

readText

suspend fun HttpResponse.readText(
    charset: Charset? = null
): String