Class RequestIntercepted

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

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

    • RequestIntercepted

      public RequestIntercepted()
  • Method Details

    • getInterceptionId

      public 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(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 String getFrameId()
      The id of the frame that initiated the request.
    • setFrameId

      public void setFrameId(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.
    • isIsNavigationRequest

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

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

      public Boolean isIsDownload()
      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(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 String getRedirectUrl()
      Redirect location, only sent if a redirect was intercepted.
    • setRedirectUrl

      public void setRedirectUrl(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 Integer getResponseStatusCode()
      Response code if intercepted at response stage or if redirect occurred while intercepting request or auth retry occurred.
    • setResponseStatusCode

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

      public Map<String,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(Map<String,Object> responseHeaders)
      Response headers if intercepted at the response stage or if redirect occurred while intercepting request or auth retry occurred.
    • getRequestId

      public 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(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.