HttpClientCall

open class HttpClientCall(val client: HttpClient) : CoroutineScope

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

Constructors

Link copied to clipboard
fun HttpClientCall(client: HttpClient, requestData: HttpRequestData, responseData: HttpResponseData)
Link copied to clipboard

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
suspend fun body(info: TypeInfo): Any

Tries to receive the payload of the response as a specific expected type provided in info. Returns response if info corresponds to HttpResponse.

Link copied to clipboard
suspend fun bodyNullable(info: TypeInfo): Any?

Tries to receive the payload of the response as a specific expected type provided in info. Returns response if info corresponds to HttpResponse.

Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard

Typed Attributes associated to this call serving as a lightweight container.

Link copied to clipboard

the client that executed the call.

Link copied to clipboard
Link copied to clipboard
lateinit var request: HttpRequest

The request sent by the client.

Link copied to clipboard
lateinit var response: HttpResponse

The response sent by the server.

Extensions

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

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

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

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

suspend fun HttpClientCall.receive(info: TypeInfo): Any

Tries to receive the payload of the response as a specific expected type provided in info. Returns response if info corresponds to HttpResponse.

Link copied to clipboard

Fetch data for HttpClientCall and close the origin.

Link copied to clipboard