pub struct InterceptedRequest {
pub request_id: String,
pub url: String,
pub method: String,
pub headers: Vec<(String, String)>,
pub resource_type: String,
pub frame_id: String,
pub has_post_data: bool,
pub redirected_from: Option<String>,
pub stage: InterceptStage,
pub response_status: Option<i64>,
pub response_headers: Vec<(String, String)>,
}Expand description
One Fetch.requestPaused event, decoded.
Fields§
§request_id: StringCDP fetch request id (what the answer is addressed to).
url: String§method: String§headers: Vec<(String, String)>Request headers, in the order CDP reported them.
resource_type: StringCDP resource type, e.g. Document, XHR, Image.
frame_id: StringCDP frame id of the frame that issued the request.
has_post_data: bool§redirected_from: Option<String>Set when this request is a redirect hop: the id of the request whose redirect caused it.
Revalidate the new url here (origin pin) exactly as for a first request.
stage: InterceptStage§response_status: Option<i64>§response_headers: Vec<(String, String)>Implementations§
Source§impl InterceptedRequest
impl InterceptedRequest
Sourcepub fn is_redirect(&self) -> bool
pub fn is_redirect(&self) -> bool
True for a request created by following a redirect.
Sourcepub fn header(&self, name: &str) -> Option<&str>
pub fn header(&self, name: &str) -> Option<&str>
First header value with this name (case-insensitive).
Sourcepub fn from_cdp_value(v: &Value) -> Option<Self>
pub fn from_cdp_value(v: &Value) -> Option<Self>
Decode the params of a Fetch.requestPaused event (CDP wire form).
Trait Implementations§
Source§impl Clone for InterceptedRequest
impl Clone for InterceptedRequest
Source§impl Debug for InterceptedRequest
impl Debug for InterceptedRequest
Source§impl PartialEq for InterceptedRequest
impl PartialEq for InterceptedRequest
Source§impl Serialize for InterceptedRequest
impl Serialize for InterceptedRequest
impl StructuralPartialEq for InterceptedRequest
Auto Trait Implementations§
impl Freeze for InterceptedRequest
impl RefUnwindSafe for InterceptedRequest
impl Send for InterceptedRequest
impl Sync for InterceptedRequest
impl Unpin for InterceptedRequest
impl UnsafeUnpin for InterceptedRequest
impl UnwindSafe for InterceptedRequest
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