chrome-devtools-kotlin / org.hildan.chrome.devtools.domains.network.events / NetworkEvent / RequestInterceptedEvent

RequestInterceptedEvent

data class RequestInterceptedEvent : NetworkEvent
Deprecated: Deprecated in the Chrome DevTools protocol

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

Official doc

Constructors

<init>

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

RequestInterceptedEvent(interceptionId: InterceptionId, request: Request, frameId: FrameId, resourceType: ResourceType, isNavigationRequest: Boolean, isDownload: Boolean? = null, redirectUrl: String? = null, authChallenge: AuthChallenge? = null, responseErrorReason: ErrorReason? = null, responseStatusCode: Int? = null, responseHeaders: Headers? = null, requestId: RequestId? = null)

Properties

authChallenge

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

val authChallenge: AuthChallenge?

frameId

The id of the frame that initiated the request.

val frameId: FrameId

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.

val interceptionId: InterceptionId

isDownload

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

val isDownload: Boolean?

isNavigationRequest

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

val isNavigationRequest: Boolean

redirectUrl

Redirect location, only sent if a redirect was intercepted.

val redirectUrl: String?

request

val request: Request

requestId

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.

val requestId: RequestId?

resourceType

How the requested resource will be used.

val resourceType: ResourceType

responseErrorReason

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

val responseErrorReason: ErrorReason?

responseHeaders

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

val responseHeaders: Headers?

responseStatusCode

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

val responseStatusCode: Int?