Skip to content
Unverified: This page has not yet been anchored to automated code tests.

vox-http-client API Reference (generated)

Crate: vox-http-client · Version: 0.6.0 · Target: Library (lib.rs)

Shared reqwest ClientBuilder presets and JSON error envelopes.

Shared [reqwest::Client] / [reqwest::ClientBuilder] presets for Vox outbound HTTP.

Policy: see docs/src/architecture/outbound-http-policy.md in the repo for when to use this crate, migration order, and exceptions.

FeatureDefault / Enables
default—
middlewaredep:async-trait, dep:http, dep:reqwest-middleware, dep:reqwest-retry, dep:tracing
ModuleDescription
envelope—
FunctionDescription
client_builderBuilder with user-agent, connect timeout, and idle pool cap suitable for CLI and services.
clientFall-back client when a custom builder chain fails to build.
bearer_auth_headerBuild an Authorization: Bearer <token> header value. Returns Err if the token contains characters invalid in an HTTP header value (control chars, non-ASCII). SSOT for bearer-token formatting — drift-check flags inline "Bearer {token}" strings.
bearer_auth_header_stringAs [bearer_auth_header], formatted as a raw String (for headers maps keyed by string).
parse_retry_afterParse a Retry-After response header as delay-seconds. SSOT for rate-limit backoff extraction. Only the delta-seconds form is supported; the HTTP-date form yields None (callers fall back to their own default backoff).
populi_control_plane_clientWrap a fully configured [reqwest::Client] with Populi middleware (trace + optional transient retries). When retry_transient is true, installs [RetryTransientMiddleware] with a small exponential backoff cap (see reqwest-retry defaults). Inner client timeouts and TLS remain unchanged.
ConstantDescription
BEARER_PREFIXAuthorization: Bearer prefix — single literal for both senders and parsers.
CONNECT_TIMEOUTDefault connect timeout for outbound HTTP (15s — interactive CLI / service).
POOL_IDLE_TIMEOUTIdle connection pool timeout (90s).