Skip to content

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).
Dependency Topology, diagram 113 nodes, 12 edges: vox-actor-runtime → vox-http-client; vox-audit → vox-http-client; vox-cli → vox-http-client; vox-cli-ci → vox-http-client; vox-cli-research → vox-http-client; vox-cli-review → vox-http-client; vox-cli-share → vox-http-client; vox-forge → vox-http-client; vox-gamify → vox-http-cl…vox-http-clientvox-actor-runtimevox-auditvox-clivox-cli-civox-cli-researchvox-cli-reviewvox-cli-sharevox-forgevox-gamifyvox-guivox-llm-egressvox-ml-cli
Diagram source
graph {
direction: right
node vox_http_client: "vox-http-client"
node vox_actor_runtime: "vox-actor-runtime"
vox_actor_runtime -> vox_http_client
node vox_audit: "vox-audit"
vox_audit -> vox_http_client
node vox_cli: "vox-cli"
vox_cli -> vox_http_client
node vox_cli_ci: "vox-cli-ci"
vox_cli_ci -> vox_http_client
node vox_cli_research: "vox-cli-research"
vox_cli_research -> vox_http_client
node vox_cli_review: "vox-cli-review"
vox_cli_review -> vox_http_client
node vox_cli_share: "vox-cli-share"
vox_cli_share -> vox_http_client
node vox_forge: "vox-forge"
vox_forge -> vox_http_client
node vox_gamify: "vox-gamify"
vox_gamify -> vox_http_client
node vox_gui: "vox-gui"
vox_gui -> vox_http_client
node vox_llm_egress: "vox-llm-egress"
vox_llm_egress -> vox_http_client
node vox_ml_cli: "vox-ml-cli"
vox_ml_cli -> vox_http_client
}
Consumer CrateRole
vox-actor-runtimeDirect workspace dependent
vox-auditDirect workspace dependent
vox-cliDirect workspace dependent
vox-cli-ciDirect workspace dependent
vox-cli-researchDirect workspace dependent
vox-cli-reviewDirect workspace dependent
vox-cli-shareDirect workspace dependent
vox-forgeDirect workspace dependent
vox-gamifyDirect workspace dependent
vox-guiDirect workspace dependent
vox-llm-egressDirect workspace dependent
vox-ml-cliDirect workspace dependent
vox-oauth-pkceDirect workspace dependent
vox-openclaw-runtimeDirect workspace dependent
vox-orchestratorDirect workspace dependent
vox-orchestrator-mcpDirect workspace dependent
vox-packageDirect workspace dependent
vox-plugin-populi-meshDirect workspace dependent
vox-plugin-webhookDirect workspace dependent
vox-populiDirect workspace dependent
vox-publisherDirect workspace dependent
vox-scientiaDirect workspace dependent
vox-searchDirect workspace dependent
vox-skillsDirect workspace dependent
vox-speechDirect workspace dependent
KindSymbolSignatureSourceDescription
fnclient_builderpub fn client_builder() -> reqwest::ClientBuildercrates/vox-http-client/src/lib.rs#L26-L31Builder with user-agent, connect timeout, and idle pool cap suitable for CLI and services.
fnclientpub fn client() -> reqwest::Clientcrates/vox-http-client/src/lib.rs#L34-L38Fall-back client when a custom builder chain fails to build.
fnbearer_auth_headerpub fn bearer_auth_header(token: &str) -> Result<HeaderValue, InvalidHeaderValue>crates/vox-http-client/src/lib.rs#L44-L48Build 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.
fnbearer_auth_header_stringpub fn bearer_auth_header_string(token: &str) -> Stringcrates/vox-http-client/src/lib.rs#L51-L53As [bearer_auth_header], formatted as a raw String (for headers maps keyed by string).
fnparse_retry_afterpub fn parse_retry_after(headers: &reqwest::header::HeaderMap) -> Option<u64>crates/vox-http-client/src/lib.rs#L60-L65Parse 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).
fnpopuli_control_plane_clientpub fn populi_control_plane_client(crates/vox-http-client/src/lib.rs#L101Wrap 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.
structenvelope::ErrorEnvelopepub struct ErrorEnvelopecrates/vox-http-client/src/envelope.rs#L10-L18Wire-format v1 error payload (ok is always false).
fnenvelope::error_jsonpub fn error_json(crates/vox-http-client/src/envelope.rs#L22Build the §6 JSON object for (StatusCode, Json<Value>) Axum responses.