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

§Author

Haixing Hu

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§

AsyncHeaderInjector
Async 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 that applies options, header injection, logging, and timeouts.
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.
HttpRequestRetryOverride
Per-request overrides for the client retry strategy.
HttpResponse
Complete HTTP response after the body has been read into memory.
HttpRetryOptions
Retry settings for crate::HttpClient.
HttpStreamResponse
HTTP response metadata plus a lazy body stream (from crate::HttpClient::execute_stream).
ProxyOptions
Outbound proxy configuration applied when building the reqwest client.
SensitiveHeaders
Case-insensitive set of HTTP header names whose values should be masked in logs.
TimeoutOptions
Connect, read, write, and optional whole-request timeouts for HTTP I/O.

Enums§

Delay
Base delay strategy before jitter is applied.
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.
Jitter
Jitter applied after a base crate::Delay has been calculated.
ProxyType
URL scheme selector used when constructing the proxy URL for reqwest.
RetryHint
High-level classification from crate::HttpError::retry_hint for backoff policies.

Type Aliases§

HeaderInjector
Header injector function used to mutate outgoing request headers.
HttpByteStream
Pin-boxed async stream of body chunks or errors, used by crate::HttpStreamResponse.
HttpResult
Result alias for HTTP operations: success value T or HttpError.