Class RequestIntercepted

java.lang.Object
io.webfolder.cdp.event.network.RequestIntercepted

public class RequestIntercepted
extends java.lang.Object
Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked Deprecated, use Fetch requestPaused instead
  • Constructor Summary

    Constructors 
    Constructor Description
    RequestIntercepted()  
  • Method Summary

    Modifier and Type Method Description
    AuthChallenge getAuthChallenge()
    Details of the Authorization Challenge encountered.
    java.lang.String getFrameId()
    The id of the frame that initiated the request.
    java.lang.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.
    java.lang.Boolean getIsDownload()
    Set if the request is a navigation that will result in a download.
    java.lang.Boolean getIsNavigationRequest()
    Whether this is a navigation request, which can abort the navigation completely.
    java.lang.String getRedirectUrl()
    Redirect location, only sent if a redirect was intercepted.
    Request getRequest()  
    java.lang.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.
    ResourceType getResourceType()
    How the requested resource will be used.
    ErrorReason getResponseErrorReason()
    Response error if intercepted at response stage or if redirect occurred while intercepting request.
    java.util.Map<java.lang.String,​java.lang.Object> getResponseHeaders()
    Response headers if intercepted at the response stage or if redirect occurred while intercepting request or auth retry occurred.
    java.lang.Integer getResponseStatusCode()
    Response code if intercepted at response stage or if redirect occurred while intercepting request or auth retry occurred.
    void setAuthChallenge​(AuthChallenge authChallenge)
    Details of the Authorization Challenge encountered.
    void setFrameId​(java.lang.String frameId)
    The id of the frame that initiated the request.
    void setInterceptionId​(java.lang.String 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.
    void setIsDownload​(java.lang.Boolean isDownload)
    Set if the request is a navigation that will result in a download.
    void setIsNavigationRequest​(java.lang.Boolean isNavigationRequest)
    Whether this is a navigation request, which can abort the navigation completely.
    void setRedirectUrl​(java.lang.String redirectUrl)
    Redirect location, only sent if a redirect was intercepted.
    void setRequest​(Request request)  
    void setRequestId​(java.lang.String 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.
    void setResourceType​(ResourceType resourceType)
    How the requested resource will be used.
    void setResponseErrorReason​(ErrorReason responseErrorReason)
    Response error if intercepted at response stage or if redirect occurred while intercepting request.
    void setResponseHeaders​(java.util.Map<java.lang.String,​java.lang.Object> responseHeaders)
    Response headers if intercepted at the response stage or if redirect occurred while intercepting request or auth retry occurred.
    void setResponseStatusCode​(java.lang.Integer responseStatusCode)
    Response code if intercepted at response stage or if redirect occurred while intercepting request or auth retry occurred.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

  • Method Details

    • getInterceptionId

      public java.lang.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.
    • setInterceptionId

      public void setInterceptionId​(java.lang.String 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.
    • getRequest

      public Request getRequest()
    • setRequest

      public void setRequest​(Request request)
    • getFrameId

      public java.lang.String getFrameId()
      The id of the frame that initiated the request.
    • setFrameId

      public void setFrameId​(java.lang.String frameId)
      The id of the frame that initiated the request.
    • getResourceType

      public ResourceType getResourceType()
      How the requested resource will be used.
    • setResourceType

      public void setResourceType​(ResourceType resourceType)
      How the requested resource will be used.
    • getIsNavigationRequest

      public java.lang.Boolean getIsNavigationRequest()
      Whether this is a navigation request, which can abort the navigation completely.
    • setIsNavigationRequest

      public void setIsNavigationRequest​(java.lang.Boolean isNavigationRequest)
      Whether this is a navigation request, which can abort the navigation completely.
    • getIsDownload

      public java.lang.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).
    • setIsDownload

      public void setIsDownload​(java.lang.Boolean 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).
    • getRedirectUrl

      public java.lang.String getRedirectUrl()
      Redirect location, only sent if a redirect was intercepted.
    • setRedirectUrl

      public void setRedirectUrl​(java.lang.String redirectUrl)
      Redirect location, only sent if a redirect was intercepted.
    • getAuthChallenge

      public AuthChallenge getAuthChallenge()
      Details of the Authorization Challenge encountered. If this is set then continueInterceptedRequest must contain an authChallengeResponse.
    • setAuthChallenge

      public void setAuthChallenge​(AuthChallenge authChallenge)
      Details of the Authorization Challenge encountered. If this is set then continueInterceptedRequest must contain an authChallengeResponse.
    • getResponseErrorReason

      public ErrorReason getResponseErrorReason()
      Response error if intercepted at response stage or if redirect occurred while intercepting request.
    • setResponseErrorReason

      public void setResponseErrorReason​(ErrorReason responseErrorReason)
      Response error if intercepted at response stage or if redirect occurred while intercepting request.
    • getResponseStatusCode

      public java.lang.Integer getResponseStatusCode()
      Response code if intercepted at response stage or if redirect occurred while intercepting request or auth retry occurred.
    • setResponseStatusCode

      public void setResponseStatusCode​(java.lang.Integer responseStatusCode)
      Response code if intercepted at response stage or if redirect occurred while intercepting request or auth retry occurred.
    • getResponseHeaders

      public java.util.Map<java.lang.String,​java.lang.Object> getResponseHeaders()
      Response headers if intercepted at the response stage or if redirect occurred while intercepting request or auth retry occurred.
    • setResponseHeaders

      public void setResponseHeaders​(java.util.Map<java.lang.String,​java.lang.Object> responseHeaders)
      Response headers if intercepted at the response stage or if redirect occurred while intercepting request or auth retry occurred.
    • getRequestId

      public java.lang.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.
    • setRequestId

      public void setRequestId​(java.lang.String 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.