HttpResponse
A response for HttpClient, second part of HttpClientCall.
Constructors
Functions
Properties
The associated HttpClientCall containing both the underlying HttpClientCall.request and HttpClientCall.response.
Unmodified ByteReadChannel with the raw payload of the response.
The HttpStatusCode returned by the server. It includes both, the HttpStatusCode.description and the HttpStatusCode.value (code).
HTTP version. Usually HttpProtocolVersion.HTTP_1_1 or HttpProtocolVersion.HTTP_2_0.
Inheritors
Extensions
Tries to receive the payload of the response as a specific type T.
Read the HttpResponse.content as a ByteReadChannel.
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.plugins.HttpPlainText settings will be used.
Efficiently discards the remaining bytes of HttpResponse.content.
Exactly reads count bytes of the HttpResponse.content.
Reads the whole HttpResponse.content if Content-Length was specified. Otherwise it just reads one byte.
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.plugins.HttpPlainText settings will be used.
HttpRequest associated with this response.