Scoop API

scoop:scoop.http.client:0.1.0

HttpClientConfig

class HttpClientConfig

source · line 74
public
public 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

property http2Settings

source · line 118
public
public val http2Settings: Http2Settings = Http2Settings()

get: public read-only

HTTP/2 settings advertised to peers.

property http2Limits

source · line 114
public
public val http2Limits: Http2Limits = Http2Limits()

get: public read-only

Local HTTP/2 memory and framing limits.

property timeouts

source · line 126
public
public val timeouts: HttpTimeoutOptions = httpTimeoutOptions()

get: public read-only

Call and phase timeouts, including body lifetime.

property cookieJar

source · line 146
public
public val cookieJar: CookieJar? = None

get: public read-only

Optional cookie storage; None disables automatic cookie handling.

property observer

source · line 159
public
public val observer: HttpObserver? = None

get: public read-only

Optional suspend observer for call progress and timing snapshots.

property http1Limits

source · line 106
public
public val http1Limits: Http1Limits = Http1Limits()

get: public read-only

Local HTTP/1 parser limits.

property redirects

source · line 130
public
public val redirects: HttpRedirectOptions = httpRedirectOptions()

get: public read-only

Redirect count, enablement, and HTTPS downgrade policy.

property cleartext

source · line 82
public
public val cleartext: HttpCleartextProtocol = HttpCleartextProtocol.Http1

get: public read-only

Explicit protocol strategy for unencrypted HTTP.

property tcpConnect

source · line 98
public
public val tcpConnect: TcpConnectOptions = tcpConnectOptions()

get: public read-only

Address selection and TCP connection-attempt options.

property versionPolicy

source · line 78
public
public val versionPolicy: HttpVersionPolicy = HttpVersionPolicy.Auto

get: public read-only

Allowed protocol versions and TLS ALPN selection.

property http1RequestVersion

source · line 86
public
public val http1RequestVersion: HttpVersion = HttpVersion.Http11

get: public read-only

The HTTP/1.0 or HTTP/1.1 version emitted for HTTP/1 requests.

property onAttempt

source · line 155
public
public 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 134
public
public val retries: HttpRetryOptions = httpRetryOptions()

get: public read-only

Retry conditions, method eligibility, and backoff policy.

property proxy

source · line 142
public
public val proxy: HttpProxySelector = HttpProxySelector.direct()

get: public read-only

Per-request proxy selection, direct by default.