Scoop API

scoop:scoop.http.client:0.1.0

scoop.http.client

API

  • interface CookieJar

    Suspendable request-cookie selection and response-cookie storage. Implementations define persistence and context policy.

  • class DiskHttpCache

    A bounded disk cache with atomic entry publication and owned read snapshots. Open it on the active event loop; pending writes do not appear as completed entries.

  • class FormDataPartBuilder
  • class HttpAttempt

    A snapshot of the concrete request target, prepared fields, route, and attempt number supplied to onAttempt.

  • class HttpAttemptMetrics

    An immutable snapshot of actual attempt phases, connection facts, response status, and body-byte counters. Unperformed phases remain None.

  • enum HttpAttemptReason

    The reason another concrete HTTP attempt is being performed.

  • class HttpAuthenticationException

    Authentication failed, retaining its reason, URL, response head, and optional underlying cause.

  • enum HttpAuthenticationFailure

    The reason authentication could not complete.

  • class HttpAuthenticationOptions

    Ordered authentication providers and a finite retry limit. Origin and proxy authentication maintain independent state.

  • class HttpAuthenticationOptionsBuilder
  • class HttpAuthenticationRequest

    The request, optional challenge, authentication-attempt count, and optional proxy endpoint supplied to a credential provider.

  • class HttpAuthenticator

    An authentication provider scoped to an exact origin and optional realm, with explicit preemptive-send policy.

  • enum HttpBasicCharset

    The configured character encoding for Basic username/password data.

  • class HttpBearerRefreshRequest

    A rejected Bearer challenge with the previous token pair and current origin/proxy authentication context.

  • class HttpBearerTokens

    An access token and optional provider-owned refresh token. The refresh token is passed to callbacks rather than sent as Authorization.

  • interface HttpCache

    Suspendable private-response storage with explicit lookup, tentative writes, and URL invalidation.

  • class HttpCacheFormatException

    Stored cache metadata is malformed or unsupported.

  • class HttpCacheKey

    The cache partition, normalized URL, and request identity used to separate representations.

  • enum HttpCacheMode

    Selects per-call use of configured private response caching.

  • class HttpCacheOptions

    Explicit cache storage, identity partition, and clock used for freshness calculations.

  • class HttpCacheOptionsBuilder
  • class HttpCacheRecord

    Stored response metadata, request/response times, and sorted unique Vary fingerprints.

  • class HttpCacheRequest

    A cache key and copied request fields used for Vary matching.

  • interface HttpCacheSnapshot

    An owned stable cached representation. Close the snapshot after consuming its body so storage can release retained resources.

  • enum HttpCacheStatus

    Where the response came from in the cache workflow.

  • class HttpCacheVary

    One normalized Vary field name and its request-field fingerprint; wildcard names are rejected.

  • interface HttpCacheWriter

    A tentative cache-body sink. Commit publishes the complete body and trailers; closing without commit abandons the write.

  • class HttpCallChain

    The current logical request and one-shot continuation into later interceptors or transport.

  • class HttpCallEvent

    An observer event combining stable call information, an attempt snapshot, and any failure.

  • enum HttpCallEventKind

    The stage or progress change reported to the observer.

  • class HttpCallInfo

    Stable call identity for observers, with method, a redacted URL display, and a monotonic start mark.

  • class HttpCallOptions

    Per-call policy overrides and request-lifetime behavior. None inherits client defaults; duplex requires HTTP/2.

  • class HttpCallOptionsBuilder
  • enum HttpCallResult

    The owned result returned through the interceptor chain: an ordinary response or WebSocket upgrade result.

  • enum HttpCleartextProtocol

    Selects how an unencrypted HTTP connection begins.

  • class HttpClient

    A reusable structured HTTP/1 and HTTP/2 client bound to one event loop and owner scope. Close it before leaving that scope; responses and streaming sessions have explicit lifetimes.

  • class HttpClientClosedException

    An operation attempted to use a closing or closed client.

  • class HttpClientConfig

    Immutable client defaults for protocols, pooling, transport, policy, storage, and callbacks. Per-call options override selected policies.

  • class HttpClientConfigBuilder
  • class HttpClientTlsConfig

    Origin or proxy TLS trust, protocol bounds, and optional client identity. Default trust uses the system store.

  • class HttpClientTlsConfigBuilder
  • class HttpConnectionPoolOptions

    Positive connection/HTTP2 stream capacities plus idle and optional maximum connection lifetimes.

  • class HttpConnectionPoolOptionsBuilder
  • enum HttpContentDecoding

    Whether response content codings are decoded before body delivery.

  • class HttpCookieContext

    The initiating site and top-level-navigation context used when a cookie jar enforces SameSite.

  • class HttpDecodingOptions

    Content-decoding mode, transfer buffer size, and maximum compression window.

  • class HttpDecodingOptionsBuilder
  • enum HttpDigestAlgorithm

    The Digest authentication hash algorithm, with separate session variants.

  • class HttpDownloadOptions

    Download publication, buffering, and progress policy. Completion atomically installs the destination; failures retain the prior destination.

  • class HttpDownloadOptionsBuilder
  • class HttpDownloadProgress

    A download progress snapshot with current written bytes, known total, and any reused prefix.

  • class HttpDownloadResult

    A completed download with committed path, final response metadata, total bytes, and reused-prefix count.

  • class HttpEventSource

    An owned serial SSE event source. It tracks last-event ID and retry delay across explicitly enabled reconnects; close cancels and awaits pending work.

  • class HttpInterceptor

    A suspend interceptor around a logical call. It may invoke the chain once while active and is responsible for returning a compatible owned result.

  • class HttpObserver

    A suspend observer of immutable call-event snapshots. Callbacks run outside the shared HTTP/2 driver; callback failures participate in call failure and cleanup.

  • class HttpPasswordCredentials

    The username and password returned by a password-based credential provider.

  • class HttpPhaseTiming

    Monotonic phase start and optional finish marks; unfinished phases retain None.

  • enum HttpProxy

    The selected route for a request: direct, HTTP proxy, or SOCKS5.

  • class HttpProxyConnectException

    An HTTP proxy rejected CONNECT with a non-success response head.

  • class HttpProxyEndpoint

    An HTTP/HTTPS proxy authority with independent TLS and authentication configuration. URL userinfo, query, and fragment are rejected.

  • class HttpProxySelector

    A suspendable per-request proxy choice. Environment variables are consulted only through an explicit environment selector.

  • class HttpRedirect

    One completed redirect step with original request, response, and selected next URL/method.

  • class HttpRedirectException

    A rejected redirect, retaining the source response, destination when known, and underlying cause.

  • enum HttpRedirectFailure

    The reason a redirect cannot be followed.

  • class HttpRedirectOptions

    Redirect enablement, maximum hops, and explicit permission for HTTPS-to-HTTP downgrade.

  • class HttpRedirectOptionsBuilder
  • class HttpRequest

    An immutable HTTP request with validated method/fields, body plan, and call options. Host and transfer framing are generated by the client; proxy credentials belong to proxy configuration.

  • class HttpRequestBuilder
  • class HttpResponse

    Final response headers plus a single-consumer body. Non-2xx responses are ordinary values until requireSuccess is called; the caller must close the response.

  • class HttpResponseBody

    A single forward-only response-body cursor with optional content decoding. Reads must not overlap; buffering helpers require an explicit byte limit.

  • class HttpResumeException

    A continuation failure with a precise category, explanation, and optional response/cause.

  • enum HttpResumeFailureReason

    The condition preventing safe byte-range continuation.

  • enum HttpResumeMismatch

    The response to incompatible or unusable partial-download metadata.

  • class HttpResumeOptions

    Explicit partial-file and metadata paths, mismatch policy, and metadata size bound. The two paths must differ.

  • class HttpResumeOptionsBuilder
  • class HttpRetryOptions

    Bounded retry eligibility and cancellable backoff. Both method semantics and body replayability must permit another attempt.

  • class HttpRetryOptionsBuilder
  • class HttpSocks5Endpoint

    A SOCKS5 authority with explicit optional credentials and local/proxy DNS resolution.

  • class HttpSseException

    An SSE setup or reconnection failure with the URL and response head when available.

  • enum HttpSseFailureReason

    The reason an HTTP response or request cannot be used as an SSE source.

  • class HttpSseOptions

    SSE parser limits, buffer size, initial event ID, and optional reconnection policy. Reconnection is disabled unless explicitly configured.

  • class HttpSseOptionsBuilder
  • class HttpSseReconnect

    A reconnect snapshot containing attempt number, selected delay, URL, current event ID, and preceding failure.

  • class HttpSseReconnectOptions

    Cancellable SSE reconnection delays, optional attempt bound, and a callback before reconnecting.

  • class HttpSseReconnectOptionsBuilder
  • class HttpStatusException

    requireSuccess rejected a response outside the 2xx status range; the response head and URL remain available.

  • class HttpTimeoutException

    An expired deadline with configured limit, elapsed time, byte progress, and optional underlying cause.

  • class HttpTimeoutOptions

    Optional nonnegative deadlines for the total call and individual waits. None disables that bound; total includes upload, response body, and cleanup.

  • class HttpTimeoutOptionsBuilder
  • enum HttpTimeoutPhase

    The call phase whose configured deadline expired.

  • class HttpUnsupportedContentCodingException

    Automatic response decoding encountered an unsupported content coding.

  • enum HttpVersionPolicy

    Restricts the HTTP protocol versions the client may negotiate.

  • class HttpWebSocketOptions

    Offered subprotocols, permessage-deflate offers, and the asynchronous session's buffering/close policy.

  • class HttpWebSocketOptionsBuilder
  • class HttpWebSocketRequest

    A ws/wss upgrade request without URL fragment or request body. Handshake-specific fields are managed by the client.

  • class HttpWebSocketRequestBuilder
  • enum HttpWebSocketResult

    An opened session or a consumable rejection response plus handshake error. Both variants require close.

  • class HttpWebSocketSession

    An owned HTTP/1.1 WebSocket session with handshake history and streaming messages. Successful upgrade ends the handshake total deadline; session lifecycle is explicit.

  • class MemoryCookieJar

    A bounded in-memory cookie jar with public-suffix, expiry, secure-overlay, and optional SameSite handling. The default does not enforce browser-style SameSite context.

  • class MemoryHttpCache

    A bounded in-memory cache with least-recently-used eviction. Entries become visible only after a successful commit.

  • class MultipartBodyBuilder
  • class RequestBody

    A request-body plan with explicit metadata and replayability. One-shot sources cannot be retried after consumption; factories reopen state without implicit whole-body buffering.

  • class RequestBodyConsumedException

    A one-shot request body was used more than once.

  • class RequestBodyLengthException

    A producer ended before, or attempted to write beyond, its declared body length.

  • class RequestBodyLimitException

    A buffering request-body operation exceeded its explicit byte limit.

  • class RequestBodyPart

    A multipart part combining a body plan with derived validated fields. HTTP trailers are not permitted inside individual parts.

  • class RequestBodyPartBuilder
  • class RequestBodyWriteResult

    The actual body bytes transferred and trailers produced after successful body completion.

  • function copy
  • function formDataPart
  • function httpAuthenticationOptions

    Configures one complete value; execution remains explicit.

  • function httpCallOptions

    Configures one complete value; execution remains explicit.

  • function httpClientConfig

    Configures one complete value; execution remains explicit.

  • function httpClientTlsConfig

    Configures one complete value; execution remains explicit.

  • function httpConnectionPoolOptions

    Configures one complete value; execution remains explicit.

  • function httpDecodingOptions

    Configures one complete value; execution remains explicit.

  • function httpDownloadOptions

    Configures one complete value; execution remains explicit.

  • function httpRedirectOptions

    Configures one complete value; execution remains explicit.

  • function httpRequest

    Configures one complete value; execution remains explicit.

  • function httpResumeOptions

    Configures one complete value; execution remains explicit.

  • function httpRetryOptions

    Configures one complete value; execution remains explicit.

  • function httpSseOptions

    Configures one complete value; execution remains explicit.

  • function httpSseReconnectOptions

    Configures one complete value; execution remains explicit.

  • function httpTimeoutOptions

    Configures one complete value; execution remains explicit.

  • function httpWebSocketOptions

    Configures one complete value; execution remains explicit.

  • function httpWebSocketRequest

    Configures one complete value; execution remains explicit.

  • function multipartBody
  • function requestBodyPart
  • function withHttpClient

    Creates a scoped client, runs the block, and closes it on every exit while awaiting active calls and cleanup.