Skip to main content

Module http

Module http 

Source
Expand description

HTTP client and server runtime owned by the network boundary.

This module owns validated HTTP configuration, outbound JSON client policy, the bounded raw JSON POST helper, async Axum router serving, request body limits, per-request timeouts, graceful shutdown, and QoS-gated listener admission. Higher layers should use these APIs instead of constructing sockets, listeners, HTTP clients, or HTTP server loops directly.

Structs§

HttpBindAddress
Validated HTTP bind address in host:port form.
HttpConfig
Event-driven HTTP configuration for inbound and outbound adapters.
HttpConnectionId
Stable identifier assigned to an accepted HTTP connection.
HttpProxyConfig
Outbound HTTP proxy and TLS verification policy.
OutboundClientError
QosHttpResponse
Reqwest response that keeps the QoS request permit until the body is consumed.

Enums§

HttpClientError
Error raised by bounded outbound JSON HTTP calls.
HttpConfigError
HTTP configuration validation error.
HttpServeError
Error raised while serving an event-driven HTTP adapter.
QosHttpClientError
Error raised by QoS-gated outbound reqwest calls.

Constants§

DEFAULT_HTTP_BIND
DEFAULT_MAX_BODY_BYTES
DEFAULT_REQUEST_TIMEOUT
DEFAULT_SHUTDOWN_TIMEOUT
DEFAULT_SSL_VERIFY

Functions§

outbound_json_client
Builds an async outbound JSON client from validated network policy.
outbound_json_client_with_policy
Builds an async outbound JSON client with request-scoped transport policy.
post_json
Posts a JSON payload through the network boundary using the configured timeout.
post_json_with_qos
Posts JSON through the raw worker HTTP helper after outbound QoS admission.
remote_clients_allowed
Returns whether a listener may accept non-local clients under the access policy.
router_with_qos_request_admission
Adds per-request QoS admission to an Axum router without opening sockets.
send_request_with_qos
Sends an outbound reqwest request after acquiring a QoS request permit.
serve_router
Starts an async HTTP server with graceful shutdown under the network boundary.
serve_router_with_qos
Starts an async HTTP server whose accepted connections consume QoS permits.