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 moreSource§impl Debug for FetcherConfig
impl Debug for FetcherConfig
Auto Trait Implementations§
impl Freeze for FetcherConfig
impl RefUnwindSafe for FetcherConfig
impl Send for FetcherConfig
impl Sync for FetcherConfig
impl Unpin for FetcherConfig
impl UnsafeUnpin for FetcherConfig
impl UnwindSafe for FetcherConfig
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<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more