vox-http-client API Reference (generated)
vox-http-client
Section titled “vox-http-client”Crate: vox-http-client · Version: 0.6.0 · Target: Library (lib.rs)
Shared reqwest ClientBuilder presets and JSON error envelopes.
Crate Overview
Section titled “Crate Overview”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.
Features
Section titled “Features”| Feature | Default / Enables |
|---|---|
default | — |
middleware | dep:async-trait, dep:http, dep:reqwest-middleware, dep:reqwest-retry, dep:tracing |
Public API Surface
Section titled “Public API Surface”Modules
Section titled “Modules”| Module | Description |
|---|---|
envelope | — |
Functions
Section titled “Functions”| Function | Description |
|---|---|
client_builder | Builder with user-agent, connect timeout, and idle pool cap suitable for CLI and services. |
client | Fall-back client when a custom builder chain fails to build. |
bearer_auth_header | Build 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_string | As [bearer_auth_header], formatted as a raw String (for headers maps keyed by string). |
parse_retry_after | Parse 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_client | Wrap 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. |
Constants
Section titled “Constants”| Constant | Description |
|---|---|
BEARER_PREFIX | Authorization: Bearer prefix — single literal for both senders and parsers. |
CONNECT_TIMEOUT | Default connect timeout for outbound HTTP (15s — interactive CLI / service). |
POOL_IDLE_TIMEOUT | Idle connection pool timeout (90s). |