class DefaultHttpResponse : HttpResponse
DefaultHttpResponse(call: HttpClientCall, responseData: HttpResponseData) |
val call: HttpClientCall
The associated HttpClientCall containing both the underlying HttpClientCall.request and HttpClientCall.response. |
|
val content: ByteReadChannel
Unmodified ByteReadChannel with the raw payload of the response. |
|
val coroutineContext: <ERROR CLASS> |
|
val headers: Headers |
|
val requestTime: GMTDate
GMTDate of the request start. |
|
val responseTime: GMTDate
GMTDate of the response start. |
|
val status: HttpStatusCode
The HttpStatusCode returned by the server. It includes both, the HttpStatusCode.description and the HttpStatusCode.value (code). |
|
val version: HttpProtocolVersion
HTTP version. Usually HttpProtocolVersion.HTTP_1_1 or HttpProtocolVersion.HTTP_2_0. |
open fun toString(): String |
val HttpResponse.request: HttpRequest
HttpRequest associated with this response. |
|
val HttpResponse. |
fun HttpResponse. |
|
suspend fun HttpResponse.discardRemaining(): Unit
Efficiently discards the remaining bytes of HttpResponse.content. |
|
fun CoroutineScope.mapEngineExceptions(input: ByteReadChannel, request: HttpRequestData): ByteReadChannel
Returns ByteReadChannel with ByteChannel.close handler that returns SocketTimeoutException instead of SocketTimeoutException. fun CoroutineScope.mapEngineExceptions(output: ByteWriteChannel, request: HttpRequestData): ByteWriteChannel
Returns ByteWriteChannel with ByteChannel.close handler that returns SocketTimeoutException instead of SocketTimeoutException. |
|
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. |
|
suspend fun HttpResponse.readText(fallbackCharset: <ERROR CLASS>? = null): String
Read the HttpResponse.content as a String. You can pass an optional charset to specify a charset in the case no one is specified as part of the Content-Type response. If no charset specified either as parameter or as part of the response, io.ktor.client.features.HttpPlainText settings will be used. |
|
suspend fun <T> HttpResponse.receive(): T
Tries to receive the payload of the response as an specific type T. |
|
fun HttpResponse. |