-
@Deprecated(message = "Deprecated in the Chrome DevTools protocol") public final class NetworkEvent.RequestInterceptedEvent extends NetworkEvent
Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked. Deprecated, use Fetch.requestPaused instead.
-
-
Field Summary
Fields Modifier and Type Field Description private final StringinterceptionIdprivate final Requestrequestprivate final StringframeIdprivate final ResourceTyperesourceTypeprivate final BooleanisNavigationRequestprivate final BooleanisDownloadprivate final StringredirectUrlprivate final AuthChallengeauthChallengeprivate final ErrorReasonresponseErrorReasonprivate final IntegerresponseStatusCodeprivate final JsonElementresponseHeadersprivate final StringrequestId
-
Constructor Summary
Constructors Constructor Description RequestInterceptedEvent(String interceptionId, Request request, String frameId, ResourceType resourceType, Boolean isNavigationRequest, Boolean isDownload, String redirectUrl, AuthChallenge authChallenge, ErrorReason responseErrorReason, Integer responseStatusCode, JsonElement responseHeaders, String requestId)
-
Method Summary
Modifier and Type Method Description final Stringcomponent1()final Requestcomponent2()final Stringcomponent3()final ResourceTypecomponent4()final Booleancomponent5()final Booleancomponent6()final Stringcomponent7()final AuthChallengecomponent8()final ErrorReasoncomponent9()final Integercomponent10()final JsonElementcomponent11()final Stringcomponent12()final NetworkEvent.RequestInterceptedEventcopy(String interceptionId, Request request, String frameId, ResourceType resourceType, Boolean isNavigationRequest, Boolean isDownload, String redirectUrl, AuthChallenge authChallenge, ErrorReason responseErrorReason, Integer responseStatusCode, JsonElement responseHeaders, String requestId)final StringgetInterceptionId()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. final RequestgetRequest()final StringgetFrameId()The id of the frame that initiated the request. final ResourceTypegetResourceType()How the requested resource will be used. final BooleangetIsNavigationRequest()Whether this is a navigation request, which can abort the navigation completely. final BooleangetIsDownload()Set if the request is a navigation that will result in a download. final StringgetRedirectUrl()Redirect location, only sent if a redirect was intercepted. final AuthChallengegetAuthChallenge()Details of the Authorization Challenge encountered. final ErrorReasongetResponseErrorReason()Response error if intercepted at response stage or if redirect occurred while intercepting request. final IntegergetResponseStatusCode()Response code if intercepted at response stage or if redirect occurred while intercepting request or auth retry occurred. final JsonElementgetResponseHeaders()Response headers if intercepted at the response stage or if redirect occurred while intercepting request or auth retry occurred. final StringgetRequestId()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. -
-
Constructor Detail
-
RequestInterceptedEvent
RequestInterceptedEvent(String interceptionId, Request request, String frameId, ResourceType resourceType, Boolean isNavigationRequest, Boolean isDownload, String redirectUrl, AuthChallenge authChallenge, ErrorReason responseErrorReason, Integer responseStatusCode, JsonElement responseHeaders, String requestId)
-
-
Method Detail
-
component1
final String component1()
-
component2
final Request component2()
-
component3
final String component3()
-
component4
final ResourceType component4()
-
component5
final Boolean component5()
-
component6
final Boolean component6()
-
component7
final String component7()
-
component8
final AuthChallenge component8()
-
component9
final ErrorReason component9()
-
component10
final Integer component10()
-
component11
final JsonElement component11()
-
component12
final String component12()
-
copy
final NetworkEvent.RequestInterceptedEvent copy(String interceptionId, Request request, String frameId, ResourceType resourceType, Boolean isNavigationRequest, Boolean isDownload, String redirectUrl, AuthChallenge authChallenge, ErrorReason responseErrorReason, Integer responseStatusCode, JsonElement responseHeaders, String requestId)
-
getInterceptionId
final String getInterceptionId()
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.
-
getRequest
final Request getRequest()
-
getFrameId
final String getFrameId()
The id of the frame that initiated the request.
-
getResourceType
final ResourceType getResourceType()
How the requested resource will be used.
-
getIsNavigationRequest
final Boolean getIsNavigationRequest()
Whether this is a navigation request, which can abort the navigation completely.
-
getIsDownload
final Boolean getIsDownload()
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).
-
getRedirectUrl
final String getRedirectUrl()
Redirect location, only sent if a redirect was intercepted.
-
getAuthChallenge
final AuthChallenge getAuthChallenge()
Details of the Authorization Challenge encountered. If this is set then continueInterceptedRequest must contain an authChallengeResponse.
-
getResponseErrorReason
final ErrorReason getResponseErrorReason()
Response error if intercepted at response stage or if redirect occurred while intercepting request.
-
getResponseStatusCode
final Integer getResponseStatusCode()
Response code if intercepted at response stage or if redirect occurred while intercepting request or auth retry occurred.
-
getResponseHeaders
final JsonElement getResponseHeaders()
Response headers if intercepted at the response stage or if redirect occurred while intercepting request or auth retry occurred.
-
getRequestId
final String getRequestId()
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.
-
-
-
-