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 moreSource§impl Debug for FetchParams
impl Debug for FetchParams
Source§impl Default for FetchParams
impl Default for FetchParams
Source§fn default() -> FetchParams
fn default() -> FetchParams
Auto Trait Implementations§
impl Freeze for FetchParams
impl RefUnwindSafe for FetchParams
impl Send for FetchParams
impl Sync for FetchParams
impl Unpin for FetchParams
impl UnsafeUnpin for FetchParams
impl UnwindSafe for FetchParams
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