httpClient

abstract fun httpClient(block: HttpClientEngineConfig.Builder.() -> Unit = {})

Override configuration settings for an HTTP client engine without specifying a specific instance. The resulting engine's lifecycle will be managed by the SDK (e.g., it will be closed when the client is closed).

This method will throw an exception if the httpClient has been set to a specific instance.

Parameters

block

A builder block used to set parameters in DSL style


abstract fun <B : HttpClientEngineConfig.Builder, E : HttpClientEngine> httpClient(engineFactory: EngineFactory<B, E>, block: B.() -> Unit = {})

Override configuration settings for an HTTP client engine without specifying a specific instance. The resulting engine's lifecycle will be managed by the SDK (e.g., it will be closed when the client is closed).

This method will throw an exception if the httpClient has been set to a specific instance.

Parameters

engineFactory

The specific engine variant to use. Selecting a non-default variant will enable access to engine-specific configuration parameters.

block

A builder block used to set parameters in DSL style


Override the default HTTP client engine used to make SDK requests (e.g. configure proxy behavior, timeouts, concurrency, etc).

NOTE: The caller is responsible for managing the lifetime of the engine when set. The SDK client will not close it when the client is closed.