pub struct RequestConfig {Show 15 fields
pub headers: Option<HashMap<String, String>>,
pub cookies: Option<HashMap<String, String>>,
pub params: Option<HashMap<String, String>>,
pub timeout_secs: Option<u64>,
pub follow_redirects: Option<FollowRedirects>,
pub max_redirects: Option<usize>,
pub retries: Option<u32>,
pub retry_delay_secs: Option<u64>,
pub proxy: Option<Proxy>,
pub verify: Option<bool>,
pub impersonate: Option<Impersonate>,
pub stealthy_headers: Option<bool>,
pub data: Option<Vec<u8>>,
pub json: Option<Value>,
pub auth: Option<(String, String)>,
}Expand description
Per-request configuration overrides that take precedence over FetcherConfig defaults.
Every field is Option – when None, the corresponding value from the fetcher’s
FetcherConfig is used instead. This lets you customize individual requests
(e.g., use a different proxy or longer timeout) without affecting the global config.
Pass this to methods like Fetcher::get() and FetcherSession::post().
Fields§
§headers: Option<HashMap<String, String>>Custom headers for this request. These are merged with the fetcher’s default headers, with per-request values taking precedence on name collisions.
Cookies to send with this request, serialized into a single Cookie header.
In a FetcherSession, the session’s cookie jar is used in addition to these.
params: Option<HashMap<String, String>>URL query parameters to append to the request URL.
timeout_secs: Option<u64>Request timeout override in seconds. When set, this replaces the fetcher’s default timeout for this single request.
follow_redirects: Option<FollowRedirects>Redirect policy override for this request.
max_redirects: Option<usize>Maximum redirects override for this request.
retries: Option<u32>Retry count override for this request. Set to Some(1) to disable retries.
retry_delay_secs: Option<u64>Retry delay override in seconds for this request.
proxy: Option<Proxy>Proxy override for this request. Overrides both the static proxy and the proxy rotator for this single request.
verify: Option<bool>TLS verification override for this request.
impersonate: Option<Impersonate>Browser impersonation override for this request.
stealthy_headers: Option<bool>Stealth headers override for this request.
data: Option<Vec<u8>>Raw request body bytes. Mutually exclusive with json – if both are set,
json takes precedence.
json: Option<Value>JSON request body. Automatically serialized and sent with a
Content-Type: application/json header. Takes precedence over data.
auth: Option<(String, String)>HTTP basic authentication credentials as (username, password).