pub struct FetchParams {
pub google_search: Option<bool>,
pub timeout_ms: Option<f64>,
pub wait_ms: Option<u64>,
pub extra_headers: Option<HashMap<String, String>>,
pub disable_resources: Option<bool>,
pub network_idle: Option<bool>,
pub load_dom: Option<bool>,
pub wait_selector: Option<String>,
pub wait_selector_state: Option<WaitState>,
pub blocked_domains: Option<HashSet<String>>,
pub solve_cloudflare: Option<bool>,
pub selector_config: Option<HashMap<String, Value>>,
}Expand description
Per-fetch parameter overrides – a subset of BrowserConfig that can be changed
on a per-request basis.
Every field is Option – when None, the value falls back to the session’s
BrowserConfig. Pass a FetchParams to [DynamicSession::fetch] or
[StealthySession::fetch] to override specific settings for a single navigation
without modifying the session-wide configuration.
Fields§
§google_search: Option<bool>Override the Google-search warm-up flag for this request.
timeout_ms: Option<f64>Override the navigation timeout in milliseconds.
wait_ms: Option<u64>Override the post-load sleep delay in milliseconds.
extra_headers: Option<HashMap<String, String>>Override the extra HTTP headers for this request.
disable_resources: Option<bool>Override the resource-blocking flag for this request.
network_idle: Option<bool>Override the network-idle wait flag for this request.
load_dom: Option<bool>Override the DOM-content-loaded wait flag for this request.
wait_selector: Option<String>CSS selector to wait for before returning, overriding the config default.
wait_selector_state: Option<WaitState>Required state of the wait selector, overriding the config default.
blocked_domains: Option<HashSet<String>>Override the set of blocked domains for this request.
solve_cloudflare: Option<bool>Enable Cloudflare challenge solving for this request.
selector_config: Option<HashMap<String, Value>>Override selector-engine configuration for this request.
Implementations§
Source§impl FetchParams
impl FetchParams
Sourcepub fn merge_with_config(&self, config: &BrowserConfig) -> ResolvedFetchParams
pub fn merge_with_config(&self, config: &BrowserConfig) -> ResolvedFetchParams
Merge these optional overrides with the base BrowserConfig to produce resolved values.
For each field, if the FetchParams value is Some, it wins; otherwise the
corresponding BrowserConfig value is used. The result is a ResolvedFetchParams
with no Option fields, ready for immediate use during navigation.
Trait Implementations§
Source§impl Clone for FetchParams
impl Clone for FetchParams
Source§fn clone(&self) -> FetchParams
fn clone(&self) -> FetchParams
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more