Expand description
The shared outbound client host: hot-reloadable reqwest stack with
same-host-only redirects, idempotent-only retries, and TLS config.
Shared HTTP client (ClientWithMiddleware): reqwest + retry middleware
stack, used by from_openapi/from_mcp forwarding handlers.
See docs/architecture/http-adapters.md.
Structs§
- Client
Cert Config - A mutual-TLS identity presented to upstreams: paths to the
PEM-encoded client certificate and its private key. Both files are
read at client-construction time (see
HttpClientBuildErrorfor the failure shapes) and combined into a single reqwestIdentity. - Http
Client Config - Policy knobs for the shared outbound client
(
SharedHttpClient). Defaults satisfy the review-001 request-policy findings (FWD-03/04/05): same-host-only redirects, idempotent-only retries with a wall-clock budget, 30 s request + 10 s connect timeouts, and a 300 sRetry-Afterceiling. Streaming (SSE) forwards ride a derived client with the total request timeout removed (FWD-15) and enforce a total streamed-bytes cap (FWD-14). - Retry
After Middleware - Per-URL
Retry-Aftermemory (FWD-05): records the backlog deadline an upstream declared and holds back subsequent requests to that URL until it elapses. LRU-bounded by capacity; deadlines clamped to the configured ceiling. - Retry
Config - Retry backoff shape for the shared outbound client. The public
surface is plain scalars (HY-06) — the concrete
reqwest_retry::ExponentialBackoffpolicy is built internally from these at client-construction time, keeping the upstream concrete type out of this crate’s API. - Shared
Http Client - A hot-reloadable, middleware-stacked outbound HTTP client shared by
consumer adapters. Clone-cheap (
ArcSwapinner); callers reach the current stack throughSharedHttpClient::client.
Enums§
- Http
Client Build Error - Why a
SharedHttpClientcould not be built: PEM file reads fail withCaBundleRead/ClientCertRead, PEM parsing fails withCaBundleParse/ClientCertParse(both carry the offending path), and the underlying reqwest builder fails withBuild.