HttpResponse
An HttpClient's response, a second part of HttpClientCall.
Learn more from Receiving responses.
Inheritors
Properties
The associated HttpClientCall containing both the underlying HttpClientCall.request and HttpClientCall.response.
Unmodified ByteReadChannel with the raw payload of the response.
Gets HttpRequest associated with this response.
GMTDate of the request start.
GMTDate of the response start.
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.
Functions
Reads the HttpResponse.content as a ByteReadChannel.
Reads 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.
Reads the whole HttpResponse.content if Content-Length
is specified. Otherwise, it just reads one byte.
Reads exactly count bytes of the HttpResponse.content.