Package-level declarations

Types

Link copied to clipboard

Exception representing that the response payload has already been received.

Link copied to clipboard
open class HttpClientCall(val client: HttpClient) : CoroutineScope

A pair of a request and response for a specific HttpClient.

Link copied to clipboard

Exception represents the inability to find a suitable transformation for the received body from the resulted type to the expected by the client type.

Link copied to clipboard

Exception representing fail of the response pipeline cause contains origin pipeline exception

Link copied to clipboard

Exception thrown when the engine does not support the content type of the HTTP request body. For instance, some engines do not support upgrade requests.

Functions

Link copied to clipboard
inline suspend fun <T> HttpClientCall.body(): T
inline suspend fun <T> HttpResponse.body(): T

Tries to receive the payload of the response as a specific type T.

suspend fun <T> HttpResponse.body(typeInfo: TypeInfo): T

Tries to receive the payload of the response as a specific type T described in typeInfo.

Link copied to clipboard

Saves the entire content of this HttpClientCall to memory and returns a new HttpClientCall with the content cached in memory. This can be particularly useful for caching, debugging, or processing responses without relying on the original network stream.