readBytes

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

Deprecated: Unbound streaming [HttpResponse] is deprecated. Consider using [HttpStatement] instead.

Exactly reads count bytes of the HttpResponse.content.

suspend fun HttpResponse.readBytes(): ByteArray

Deprecated: Unbound streaming [HttpResponse] is deprecated. Consider using [HttpStatement] instead.

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