pl.wendigo.chrome.api.network / RequestInterceptedEvent

RequestInterceptedEvent

data class RequestInterceptedEvent : Event (source)

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

Link
Network#requestIntercepted event documentation.

Constructors

<init>

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)

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

Properties

authChallenge

val authChallenge: AuthChallenge?

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

frameId

val frameId: FrameId

The id of the frame that initiated the request.

interceptionId

val interceptionId: 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.

isDownload

val isDownload: Boolean?

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

isNavigationRequest

val isNavigationRequest: Boolean

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

redirectUrl

val redirectUrl: String?

Redirect location, only sent if a redirect was intercepted.

request

val request: Request

requestId

val requestId: 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.

resourceType

val resourceType: ResourceType

How the requested resource will be used.

responseErrorReason

val responseErrorReason: ErrorReason?

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

responseHeaders

val responseHeaders: Headers?

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

responseStatusCode

val responseStatusCode: Int?

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

Inherited Functions

protocolDomain

fun protocolDomain(): String