Skip to main content

Module http

Module http 

Source
Expand description

Reusable, config-swappable reqwest::Client configuration and distribution.

SwappableClient distributes cloned reqwest::Client handles from a shared HttpClientConfig. Because reqwest::Client is internally reference-counted, swapping the configuration does not disrupt in-flight requests: requests that already acquired a client continue on the previous instance until completion, while subsequent requests receive the new client.

Structs§

HttpClientConfig
Reusable configuration for constructing reqwest::Client instances.
SwappableClient
Config-swappable distributor of reqwest::Client instances.

Enums§

HttpClientError
Errors returned when building or swapping a reqwest::Client.
HttpRequestError
Errors returned when executing and decoding HTTP requests via RequestBuilderExt.

Constants§

DEFAULT_CONNECT_TIMEOUT
Default connection timeout applied by HttpClientConfig::default.
DEFAULT_READ_TIMEOUT
Default socket read timeout applied by HttpClientConfig::default.
DEFAULT_USER_AGENT
Default User-Agent header applied by HttpClientConfig::default.

Traits§

RequestBuilderExt
Convenience response-decoding helpers on reqwest::RequestBuilder.

Type Aliases§

Result
Result alias for crate::http configuration operations.