ktor-client-core / io.ktor.client.request / DefaultHttpRequest

DefaultHttpRequest

open class DefaultHttpRequest : HttpRequest

Default HttpRequest implementation.

Constructors

<init>

DefaultHttpRequest(call: HttpClientCall, data: HttpRequestData)

Default HttpRequest implementation.

Properties

attributes

open val attributes: Attributes

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

call

open val call: HttpClientCall

The associated HttpClientCall containing both the underlying HttpClientCall.request and HttpClientCall.response.

content

open val content: OutgoingContent

An OutgoingContent representing the request body

coroutineContext

open val coroutineContext: <ERROR CLASS>

headers

open val headers: Headers

method

open val method: HttpMethod

The HttpMethod or HTTP VERB used for this request.

url

open val url: Url

The Url representing the endpoint and the uri for this request.

Extension Functions

mapEngineExceptions

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.