struct Protocol::Network::RequestIntercepted

Overview

Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked. Deprecated, use Fetch.requestPaused instead.

Included Modules

Defined in:

protocol/network.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(pull : JSON::PullParser) #

[View source]

Instance Method Detail

def auth_challenge : AuthChallenge | Nil #

Details of the Authorization Challenge encountered. If this is set then continueInterceptedRequest must contain an authChallengeResponse.


[View source]
def frame_id : Page::FrameId #

The id of the frame that initiated the request.


[View source]
def interception_id : InterceptionId #

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.


[View source]
def is_download : Bool | Nil #

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).


[View source]
def is_navigation_request : Bool #

Whether this is a navigation request, which can abort the navigation completely.


[View source]
def redirect_url : String | Nil #

Redirect location, only sent if a redirect was intercepted.


[View source]
def request : Request #

[View source]
def request_id : RequestId | Nil #

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.


[View source]
def resource_type : ResourceType #

How the requested resource will be used.


[View source]
def response_error_reason : ErrorReason | Nil #

Response error if intercepted at response stage or if redirect occurred while intercepting request.


[View source]
def response_headers : Headers | Nil #

Response headers if intercepted at the response stage or if redirect occurred while intercepting request or auth retry occurred.


[View source]
def response_status_code : Int::Primitive | Nil #

Response code if intercepted at response stage or if redirect occurred while intercepting request or auth retry occurred.


[View source]