class HttpClientConfig
source · line 74public class HttpClientConfig internal constructor(
/**
* Allowed protocol versions and TLS ALPN selection.
*/
public val versionPolicy: HttpVersionPolicy = HttpVersionPolicy.Auto,
/**
* Explicit protocol strategy for unencrypted HTTP.
*/
public val cleartext: HttpCleartextProtocol = HttpCleartextProtocol.Http1,
/**
* The HTTP/1.0 or HTTP/1.1 version emitted for HTTP/1 requests.
*/
public val http1RequestVersion: HttpVersion = HttpVersion.Http11,
/**
* Origin TLS trust, version bounds, and client identity.
*/
public val tls: HttpClientTlsConfig = httpClientTlsConfig(),
/**
* Connection and HTTP/2 stream capacities and retirement policy.
*/
public val pool: HttpConnectionPoolOptions = httpConnectionPoolOptions(),
/**
* Address selection and TCP connection-attempt options.
*/
public val tcpConnect: TcpConnectOptions = tcpConnectOptions(),
/**
* HTTP/1 parser compatibility policy.
*/
public val http1Receive: Http1ReceiveOptions = Http1ReceiveOptions(),
/**
* Local HTTP/1 parser limits.
*/
public val http1Limits: Http1Limits = Http1Limits(),
/**
* HTTP/2 receive compatibility policy.
*/
public val http2Receive: Http2ReceiveOptions = Http2ReceiveOptions(),
/**
* Local HTTP/2 memory and framing limits.
*/
public val http2Limits: Http2Limits = Http2Limits(),
/**
* HTTP/2 settings advertised to peers.
*/
public val http2Settings: Http2Settings = Http2Settings(),
/**
* Response content-decoding policy.
*/
public val decoding: HttpDecodingOptions = httpDecodingOptions(),
/**
* Call and phase timeouts, including body lifetime.
*/
public val timeouts: HttpTimeoutOptions = httpTimeoutOptions(),
/**
* Redirect count, enablement, and HTTPS downgrade policy.
*/
public val redirects: HttpRedirectOptions = httpRedirectOptions(),
/**
* Retry conditions, method eligibility, and backoff policy.
*/
public val retries: HttpRetryOptions = httpRetryOptions(),
/**
* Origin authentication providers and attempt limit.
*/
public val authentication: HttpAuthenticationOptions = httpAuthenticationOptions(),
/**
* Per-request proxy selection, direct by default.
*/
public val proxy: HttpProxySelector = HttpProxySelector.direct(),
/**
* Optional cookie storage; None disables automatic cookie handling.
*/
public val cookieJar: CookieJar? = None,
/**
* Optional private-response cache and partition settings.
*/
public val cache: HttpCacheOptions? = None,
interceptors: List<HttpInterceptor> = emptyList<HttpInterceptor>(),
/**
* Optional suspend callback producing extra fields for each actual attempt.
*/
public val onAttempt: (suspend (HttpAttempt) -> List<HttpField>)? = None,
/**
* Optional suspend observer for call progress and timing snapshots.
*/
public val observer: HttpObserver? = None
)
Immutable client defaults for protocols, pooling, transport, policy, storage, and callbacks. Per-call options override selected policies.
Extensions
public fun HttpClientConfig.copy(configure: HttpClientConfigBuilder.() -> Unit = {}): HttpClientConfig· scoop:scoop.http.client:0.1.0
property pool
source · line 94public val pool: HttpConnectionPoolOptions = httpConnectionPoolOptions()
get: public read-only
Connection and HTTP/2 stream capacities and retirement policy.
property authentication
source · line 138public val authentication: HttpAuthenticationOptions = httpAuthenticationOptions()
get: public read-only
Origin authentication providers and attempt limit.
property http2Receive
source · line 110public val http2Receive: Http2ReceiveOptions = Http2ReceiveOptions()
get: public read-only
HTTP/2 receive compatibility policy.
property http2Settings
source · line 118public val http2Settings: Http2Settings = Http2Settings()
get: public read-only
HTTP/2 settings advertised to peers.
property http2Limits
source · line 114public val http2Limits: Http2Limits = Http2Limits()
get: public read-only
Local HTTP/2 memory and framing limits.
property timeouts
source · line 126public val timeouts: HttpTimeoutOptions = httpTimeoutOptions()
get: public read-only
Call and phase timeouts, including body lifetime.
property cookieJar
source · line 146public val cookieJar: CookieJar? = None
get: public read-only
Optional cookie storage; None disables automatic cookie handling.
property observer
source · line 159public val observer: HttpObserver? = None
get: public read-only
Optional suspend observer for call progress and timing snapshots.
property http1Receive
source · line 102public val http1Receive: Http1ReceiveOptions = Http1ReceiveOptions()
get: public read-only
HTTP/1 parser compatibility policy.
property interceptors
source · line 164public val interceptors: Array<HttpInterceptor>
get: public read-only
Ordered suspend interceptors around the logical call.
property http1Limits
source · line 106public val http1Limits: Http1Limits = Http1Limits()
get: public read-only
Local HTTP/1 parser limits.
property redirects
source · line 130public val redirects: HttpRedirectOptions = httpRedirectOptions()
get: public read-only
Redirect count, enablement, and HTTPS downgrade policy.
property cleartext
source · line 82public val cleartext: HttpCleartextProtocol = HttpCleartextProtocol.Http1
get: public read-only
Explicit protocol strategy for unencrypted HTTP.
property tcpConnect
source · line 98public val tcpConnect: TcpConnectOptions = tcpConnectOptions()
get: public read-only
Address selection and TCP connection-attempt options.
property versionPolicy
source · line 78public val versionPolicy: HttpVersionPolicy = HttpVersionPolicy.Auto
get: public read-only
Allowed protocol versions and TLS ALPN selection.
property decoding
source · line 122public val decoding: HttpDecodingOptions = httpDecodingOptions()
get: public read-only
Response content-decoding policy.
property http1RequestVersion
source · line 86public val http1RequestVersion: HttpVersion = HttpVersion.Http11
get: public read-only
The HTTP/1.0 or HTTP/1.1 version emitted for HTTP/1 requests.
property tls
source · line 90public val tls: HttpClientTlsConfig = httpClientTlsConfig()
get: public read-only
Origin TLS trust, version bounds, and client identity.
property cache
source · line 150public val cache: HttpCacheOptions? = None
get: public read-only
Optional private-response cache and partition settings.
property onAttempt
source · line 155public val onAttempt: (suspend (HttpAttempt) -> List<HttpField>)? = None
get: public read-only
Optional suspend callback producing extra fields for each actual attempt.
property retries
source · line 134public val retries: HttpRetryOptions = httpRetryOptions()
get: public read-only
Retry conditions, method eligibility, and backoff policy.
property proxy
source · line 142public val proxy: HttpProxySelector = HttpProxySelector.direct()
get: public read-only
Per-request proxy selection, direct by default.