pub struct FetchOptions {
pub headers: Option<HashMap<String, String>>,
pub method: Option<String>,
pub post_data: Option<String>,
pub post_data_bytes: Option<Vec<u8>>,
pub url: Option<String>,
pub max_redirects: Option<u32>,
pub max_retries: Option<u32>,
pub timeout: Option<f64>,
}Expand description
Options for fetching a route’s request.
See: https://playwright.dev/docs/api/class-route#route-fetch
Fields§
§headers: Option<HashMap<String, String>>Modified request headers
method: Option<String>Modified request method (GET, POST, etc.)
post_data: Option<String>Modified POST data as string
post_data_bytes: Option<Vec<u8>>Modified POST data as bytes
url: Option<String>Modified request URL
max_redirects: Option<u32>Maximum number of redirects to follow (default: 20)
max_retries: Option<u32>Maximum number of retries (default: 0)
timeout: Option<f64>Request timeout in milliseconds
Implementations§
Source§impl FetchOptions
impl FetchOptions
Sourcepub fn builder() -> FetchOptionsBuilder
pub fn builder() -> FetchOptionsBuilder
Creates a new FetchOptions builder
Trait Implementations§
Source§impl Clone for FetchOptions
impl Clone for FetchOptions
Source§fn clone(&self) -> FetchOptions
fn clone(&self) -> FetchOptions
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for FetchOptions
impl Debug for FetchOptions
Source§impl Default for FetchOptions
impl Default for FetchOptions
Source§fn default() -> FetchOptions
fn default() -> FetchOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for FetchOptions
impl RefUnwindSafe for FetchOptions
impl Send for FetchOptions
impl Sync for FetchOptions
impl Unpin for FetchOptions
impl UnsafeUnpin for FetchOptions
impl UnwindSafe for FetchOptions
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
Mutably borrows from an owned value. Read more