pub struct FetcherConfig {
pub impersonate: Impersonate,
pub stealthy_headers: bool,
pub proxy: Option<Proxy>,
pub timeout_secs: u64,
pub headers: HashMap<String, String>,
pub retries: u32,
pub retry_delay_secs: u64,
pub follow_redirects: FollowRedirects,
pub max_redirects: usize,
pub verify: bool,
}Expand description
Configuration for the HTTP fetcher.
This struct holds the default settings applied to every request made by a
Fetcher or FetcherSession.
Individual requests can override most of these via RequestConfig.
Use FetcherConfigBuilder for a validated, fluent construction path.
Fields§
§impersonate: ImpersonateThe browser impersonation profile to use. Controls which TLS and HTTP/2 fingerprint the client presents to the server. Defaults to Chrome.
stealthy_headers: boolWhether to inject stealth headers (Referer, Sec-Ch-Ua, etc.) that make requests look like they come from a real browser. Enabled by default.
proxy: Option<Proxy>An optional static proxy to route all requests through. If you need to
rotate across multiple proxies, use a ProxyRotator instead.
timeout_secs: u64Request timeout in seconds. Defaults to 30. Applies to the entire request lifecycle including DNS resolution, connection, and response body download.
headers: HashMap<String, String>Default headers to include with every request. These are merged with per-request headers, with per-request values taking precedence on conflict.
retries: u32Maximum number of retry attempts per request. Defaults to 3. Set to 1 to disable retries entirely.
retry_delay_secs: u64Delay in seconds between retry attempts. Defaults to 1. This is a fixed delay, not exponential backoff.
follow_redirects: FollowRedirectsThe redirect-following policy. Defaults to FollowRedirects::Safe.
max_redirects: usizeMaximum number of redirects to follow before giving up. Defaults to 30.
Only applies when follow_redirects is not FollowRedirects::None.
verify: boolWhether to verify TLS certificates. Defaults to true. Set to false
only for testing against self-signed certificates – never in production.
Trait Implementations§
Source§impl Clone for FetcherConfig
impl Clone for FetcherConfig
Source§fn clone(&self) -> FetcherConfig
fn clone(&self) -> FetcherConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more