Package io.ktor.client.response

Types

Link copied to clipboard
class HttpResponse : CoroutineScope, HttpMessage

Functions

Link copied to clipboard
suspend fun HttpResponse.discardRemaining()

Efficiently discards the remaining bytes of HttpResponse.content.

Link copied to clipboard
suspend fun HttpResponse.readBytes(): ByteArray

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

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

Exactly reads count bytes of the HttpResponse.content.

Link copied to clipboard
suspend fun HttpResponse.readText(charset: Charset? = null): String