ApacheEngineConfig

class ApacheEngineConfig : HttpClientEngineConfig

Configuration for Apache implementation of HttpClientEngineFactory.

Constructors

<init>

ApacheEngineConfig()

Configuration for Apache implementation of HttpClientEngineFactory.

Properties

connectTimeout

var connectTimeout: Int

Max milliseconds to establish an HTTP connection - default 10 seconds. A value of 0 represents infinite, while -1 represents system’s default value.

connectionRequestTimeout

var connectionRequestTimeout: Int

Max milliseconds for the connection manager to start a request - default 20 seconds. A value of 0 represents infinite, while -1 represents system’s default value.

customClient

var customClient: HttpAsyncClientBuilder.() -> HttpAsyncClientBuilder

Custom processor for HttpAsyncClientBuilder.

customRequest

var customRequest: Builder.() -> Builder

Custom processor for RequestConfig.Builder.

followRedirects

var followRedirects: Boolean

Whether or not, it will follow Location headers. false by default. It uses the default number of redirects defined by Apache’s HttpClient that is 50.

socketTimeout

var socketTimeout: Int

Max milliseconds between TCP packets - default 10 seconds. A value of 0 represents infinite, while -1 represents system’s default value.

sslContext

var sslContext: SSLContext?

Optional Java’s SSLContext allowing to set custom keys, trust manager or custom source for secure random data

Inherited Properties

dispatcher

var dispatcher: CoroutineDispatcher?

The CoroutineDispatcher that will be used for the client requests.

pipelining

var pipelining: Boolean

Enable http pipelining advice.

response

val response: HttpResponseConfig

Configuration for http response.

threadsCount

var threadsCount: Int

Network threads count advice.

Functions

customizeClient

fun customizeClient(
    block: HttpAsyncClientBuilder.() -> Unit
): Unit

Customizes a HttpAsyncClientBuilder in the specified block.

customizeRequest

fun customizeRequest(block: Builder.() -> Unit): Unit

Customizes a RequestConfig.Builder in the specified block.