pub struct RequestInfo {
pub url: String,
pub method: String,
pub headers: Vec<(String, String)>,
pub post_data: Option<Vec<u8>>,
pub resource_type: ResourceType,
}Expand description
Information about an intercepted request, surfaced to rule closures and stream consumers.
Headers are a Vec<(name, value)> rather than a HashMap so duplicates
(multiple Set-Cookie, multi-value Cookie, etc.) and Chrome’s emission
order survive the round-trip into user code and back through
RequestOverrides. CDP’s underlying wire shape is a [{name, value}]
array; this type matches that shape.
Fields§
§url: StringFull request URL (post-redirect resolution by Chrome).
method: StringHTTP method (GET, POST, …).
headers: Vec<(String, String)>Request headers as Chrome reported them. Order is Chrome’s emission order; duplicates are preserved.
post_data: Option<Vec<u8>>Request body, if any. Sourced from postDataEntries (binary-safe)
when present, otherwise the UTF-8 bytes of postData.
resource_type: ResourceTypeChrome’s classification of the request’s resource type.
Trait Implementations§
Source§impl Clone for RequestInfo
impl Clone for RequestInfo
Source§fn clone(&self) -> RequestInfo
fn clone(&self) -> RequestInfo
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for RequestInfo
impl RefUnwindSafe for RequestInfo
impl Send for RequestInfo
impl Sync for RequestInfo
impl Unpin for RequestInfo
impl UnsafeUnpin for RequestInfo
impl UnwindSafe for RequestInfo
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