Skip to main content

Crate qubit_http

Crate qubit_http 

Source
Expand description

§Qubit HTTP

A general-purpose HTTP infrastructure module for Rust services.

This crate provides:

  • Unified HTTP client options and factory abstractions
  • Loading those options from qubit_config::ConfigReader (from_config / factory create_from_config)
  • Consistent request/response/stream APIs
  • Secure and configurable logging with sensitive header masking
  • Built-in SSE decoding utilities in sse
  • Unified error model and retry hints

Re-exports§

pub use constants::DEFAULT_SENSITIVE_HEADER_NAMES;

Modules§

constants
Crate-wide defaults and fixed tuning values for HTTP client behavior and logging.
sse
SSE Decoding

Structs§

AsyncHttpHeaderInjector
Async HTTP header injector that can await external state (for example token refresh) before mutating outbound request headers.
CancellationToken
A token which can be used to signal a cancellation request to one or more tasks.
HttpClient
High-level HTTP client: default headers, injectors, interceptors, logging, timeouts, and optional per-request retry.
HttpClientFactory
Public factory used to build reqwest-backed HttpClient instances.
HttpClientOptions
Aggregated settings for crate::HttpClient and crate::HttpClientFactory.
HttpConfigError
Error type for HTTP configuration conversion failures.
HttpError
Unified HTTP error type.
HttpLogger
HTTP logger bound to one pair of logging options and sensitive header policy.
HttpLoggingOptions
Controls TRACE-level HTTP request/response logging in crate::HttpLogger.
HttpRequest
Immutable snapshot of a single HTTP call produced by crate::HttpRequestBuilder.
HttpRequestBuilder
Builder for HttpRequest.
HttpRequestInterceptors
Ordered request interceptor list with unified application behavior.
HttpRequestRetryOverride
Per-request overrides for the client retry strategy.
HttpRequestStreamingBody
Deferred streaming upload body source.
HttpResponse
Unified HTTP response with lazily consumed body.
HttpResponseInterceptors
Ordered response interceptor list with unified application behavior.
HttpResponseMeta
HTTP response metadata available before body buffering/stream consumption.
HttpRetryOptions
Retry settings for crate::HttpClient.
HttpTimeoutOptions
Connect, read, write, and optional whole-request timeouts for HTTP I/O.
ProxyOptions
Outbound proxy configuration applied when building the reqwest client.
RetryOptions
Immutable retry option snapshot used by crate::Retry.
SensitiveHttpHeaders
Case-insensitive set of HTTP header names whose values should be masked in logs.

Enums§

HttpConfigErrorKind
Category of HTTP configuration errors.
HttpErrorKind
Category of HTTP errors.
HttpRequestBody
Encodes how the outbound body is represented before sending via reqwest.
HttpRetryMethodPolicy
HTTP method policy used to decide whether a request can be retried.
ProxyType
URL scheme selector used when constructing the proxy URL for reqwest.
RetryDelay
Base delay strategy before jitter is applied.
RetryHint
High-level classification from crate::HttpError::retry_hint for backoff policies.
RetryJitter
Jitter strategy applied after a base crate::RetryDelay has been calculated.

Type Aliases§

HttpByteStream
Pin-boxed async stream of body chunks or errors, used by crate::HttpResponse.
HttpHeaderInjector
Header injector function used to mutate outgoing request headers.
HttpRequestBodyByteStream
Pin-boxed async stream used for request streaming upload bodies.
HttpRequestInterceptor
Request interceptor function used to mutate an outbound HttpRequest before URL resolution, header merge, and network I/O.
HttpResponseInterceptor
Response interceptor function used to inspect/mutate response metadata (status, headers, url) before the response is returned to callers.
HttpResult
Result alias for HTTP operations: success value T or HttpError.