pub struct HttpClientConfig {
pub total_timeout_ms: Option<u64>,
pub transport_retries: Option<u8>,
pub initial_backoff_ms: Option<u64>,
pub user_agent: Option<String>,
pub proxy: HttpProxyConfig,
}Expand description
Typed configuration for the HTTP client stack.
Only captures user intent (None always means “use the HTTP stack layer default”);
the CLI entry point converts it to defect_http::HttpStackConfig when assembling the
provider.
Not sharing a type directly with defect_http::HttpStackConfig preserves a one-way
crate dependency: defect-config does not depend on defect-http, preventing
downstream consumers like fetch tool from creating a reverse dependency.
Fields§
§total_timeout_ms: Option<u64>Total timeout for a single request; None means use the HTTP stack default
(600s).
transport_retries: Option<u8>Maximum number of transport error retries (excluding the first attempt); None
means default 2, Some(0) disables retries.
initial_backoff_ms: Option<u64>Initial backoff for retries; None = default 200ms.
user_agent: Option<String>Override the User-Agent header; None uses the compile-time default
defect-http/{version} ({git_sha}).
proxy: HttpProxyConfigProxy sub-configuration. mode defaults to FromEnv (reads HTTP_PROXY etc.).
Trait Implementations§
Source§impl Clone for HttpClientConfig
impl Clone for HttpClientConfig
Source§fn clone(&self) -> HttpClientConfig
fn clone(&self) -> HttpClientConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for HttpClientConfig
impl Debug for HttpClientConfig
Source§impl Default for HttpClientConfig
impl Default for HttpClientConfig
Source§fn default() -> HttpClientConfig
fn default() -> HttpClientConfig
impl Eq for HttpClientConfig
Source§impl PartialEq for HttpClientConfig
impl PartialEq for HttpClientConfig
Source§fn eq(&self, other: &HttpClientConfig) -> bool
fn eq(&self, other: &HttpClientConfig) -> bool
self and other values to be equal, and is used by ==.impl StructuralPartialEq for HttpClientConfig
Auto Trait Implementations§
impl Freeze for HttpClientConfig
impl RefUnwindSafe for HttpClientConfig
impl Send for HttpClientConfig
impl Sync for HttpClientConfig
impl Unpin for HttpClientConfig
impl UnsafeUnpin for HttpClientConfig
impl UnwindSafe for HttpClientConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.