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.
Provides a raw ByteReadChannel to the response content as it was read from the network. This content can be still compressed or encoded.
Provides a raw ByteReadChannel to the response content as it is read from the network. This content can be still compressed or encoded.
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 response body as a byte array. Note that all plugins will be applied to the response body, which may be decompressed or decoded.
Reads the HttpResponse.rawContent as a ByteReadChannel.
Reads the HttpResponse.rawContent 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.rawContent.
Reads the raw payload of the HTTP response as a byte array.
Reads exactly count bytes of the HttpResponse.rawContent.
Reads the raw payload of the HTTP response as a byte array.