ktor-client-core / io.ktor.client.engine / HttpClientJvmEngine

HttpClientJvmEngine

abstract class HttpClientJvmEngine : HttpClientEngine
Deprecated: Use HttpClientEngineBase instead.

Base jvm implementation for HttpClientEngine

Constructors

<init>

HttpClientJvmEngine(engineName: String)

Base jvm implementation for HttpClientEngine

Properties

coroutineContext

open val coroutineContext: <ERROR CLASS>

dispatcher

open val dispatcher: CoroutineDispatcher

CoroutineDispatcher specified for io operations.

Inherited Properties

config

abstract val config: HttpClientEngineConfig

Engine configuration

supportedCapabilities

open val supportedCapabilities: Set<HttpClientEngineCapability<*>>

Set of supported engine extensions.

Functions

close

open fun close(): Unit

createCallContext

suspend fun createCallContext(): <ERROR CLASS>

Create CoroutineContext to execute call.

Inherited Functions

execute

abstract suspend fun execute(data: HttpRequestData): HttpResponseData

Creates a new HttpClientCall specific for this engine, using a request data.

install

open fun install(client: HttpClient): Unit

Install engine into HttpClient.

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.