open class HttpClientCall : CoroutineScope
A class that represents a single pair of request and response for a specific HttpClient.
open val allowDoubleReceive: Boolean |
|
val attributes: Attributes
Typed Attributes associated to this call serving as a lightweight container. |
|
val client: HttpClient?
: client that executed the call. |
|
open val coroutineContext: <ERROR CLASS> |
|
lateinit var request: HttpRequest
Represents the request sent by the client |
|
lateinit var response: HttpResponse
Represents the response sent by the server. |
open suspend fun getResponseContent(): ByteReadChannel |
|
suspend fun receive(info: TypeInfo): Any suspend fun 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. |
|
open fun toString(): String |
val
CustomResponse key used to process the response of custom type in case of HttpClientEngine can't return body bytes directly. If present, attribute value will be an initial value for HttpResponseContainer in HttpClient.responsePipeline. |
fun CoroutineScope.mapEngineExceptions(input: ByteReadChannel, request: HttpRequestData): ByteReadChannel
Returns ByteReadChannel with ByteChannel.close handler that returns SocketTimeoutException instead of SocketTimeoutException. fun CoroutineScope.mapEngineExceptions(output: ByteWriteChannel, request: HttpRequestData): ByteWriteChannel
Returns ByteWriteChannel with ByteChannel.close handler that returns SocketTimeoutException instead of SocketTimeoutException. |
|
suspend fun <T> HttpClientCall.receive(): T
Tries to receive the payload of the response as an specific type T. |
|
suspend fun HttpClientCall.save(): HttpClientCall
Fetch data for HttpClientCall and close the origin. |
|
fun HttpClientCall. fun HttpClientCall.wrapWithContent(content: ByteReadChannel): HttpClientCall
Wrap existing HttpClientCall with new content. |