pub struct RequestInterceptedEventParamsBuilder { /* private fields */ }Expand description
Builder for RequestInterceptedEventParams.
Implementations§
Source§impl RequestInterceptedEventParamsBuilder
impl RequestInterceptedEventParamsBuilder
Sourcepub fn interception_id(&mut self, value: InterceptionId) -> &mut Self
pub fn interception_id(&mut self, value: InterceptionId) -> &mut Self
Each request the page makes will have a unique id, however if any redirects are encountered while processing that fetch, they will be reported with the same id as the original fetch. Likewise if HTTP authentication is needed then the same fetch id will be used.
pub fn request(&mut self, value: Request) -> &mut Self
Sourcepub fn frame_id(&mut self, value: FrameId) -> &mut Self
pub fn frame_id(&mut self, value: FrameId) -> &mut Self
The id of the frame that initiated the request.
Sourcepub fn resource_type(&mut self, value: ResourceType) -> &mut Self
pub fn resource_type(&mut self, value: ResourceType) -> &mut Self
How the requested resource will be used.
Whether this is a navigation request, which can abort the navigation completely.
Sourcepub fn is_download(&mut self, value: Option<bool>) -> &mut Self
pub fn is_download(&mut self, value: Option<bool>) -> &mut Self
Set if the request is a navigation that will result in a download. Only present after response is received from the server (i.e. HeadersReceived stage).
Sourcepub fn redirect_url(&mut self, value: Option<String>) -> &mut Self
pub fn redirect_url(&mut self, value: Option<String>) -> &mut Self
Redirect location, only sent if a redirect was intercepted.
Sourcepub fn auth_challenge(&mut self, value: Option<AuthChallenge>) -> &mut Self
pub fn auth_challenge(&mut self, value: Option<AuthChallenge>) -> &mut Self
Details of the Authorization Challenge encountered. If this is set then continueInterceptedRequest must contain an authChallengeResponse.
Sourcepub fn response_error_reason(&mut self, value: Option<ErrorReason>) -> &mut Self
pub fn response_error_reason(&mut self, value: Option<ErrorReason>) -> &mut Self
Response error if intercepted at response stage or if redirect occurred while intercepting request.
Sourcepub fn response_status_code(&mut self, value: Option<JsUInt>) -> &mut Self
pub fn response_status_code(&mut self, value: Option<JsUInt>) -> &mut Self
Response code if intercepted at response stage or if redirect occurred while intercepting request or auth retry occurred.
Sourcepub fn response_headers(&mut self, value: Option<Headers>) -> &mut Self
pub fn response_headers(&mut self, value: Option<Headers>) -> &mut Self
Response headers if intercepted at the response stage or if redirect occurred while intercepting request or auth retry occurred.
Sourcepub fn request_id(&mut self, value: Option<RequestId>) -> &mut Self
pub fn request_id(&mut self, value: Option<RequestId>) -> &mut Self
If the intercepted request had a corresponding requestWillBeSent event fired for it, then this requestId will be the same as the requestId present in the requestWillBeSent event.
Sourcepub fn build(
&self,
) -> Result<RequestInterceptedEventParams, RequestInterceptedEventParamsBuilderError>
pub fn build( &self, ) -> Result<RequestInterceptedEventParams, RequestInterceptedEventParamsBuilderError>
Trait Implementations§
Source§impl Clone for RequestInterceptedEventParamsBuilder
impl Clone for RequestInterceptedEventParamsBuilder
Source§fn clone(&self) -> RequestInterceptedEventParamsBuilder
fn clone(&self) -> RequestInterceptedEventParamsBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more