Package Torello.Browser
Class Network.requestIntercepted
- java.lang.Object
-
- Torello.Java.JSON.BaseType
-
- Torello.Browser.BrowserEvent
-
- Torello.Browser.Network.requestIntercepted
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- Network
public static class Network.requestIntercepted extends BrowserEvent implements java.io.Serializable
Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked. Deprecated, use Fetch.requestPaused instead.
EXPERIMENTAL
DEPRECATED- See Also:
- Serialized Form
Hi-Lited Source-Code:- View Here: Torello/Browser/Network.java
- Open New Browser-Tab: Torello/Browser/Network.java
File Size: 11,343 Bytes Line Count: 242 '\n' Characters Found
-
-
Field Summary
Serializable ID Modifier and Type Field protected static long
serialVersionUID
For Object Serialization.Event Properties Modifier and Type Field Network.AuthChallenge
authChallenge
Details of the Authorization Challenge encountered.String
frameId
The id of the frame that initiated the request.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.Boolean
isDownload
Set if the request is a navigation that will result in a download.boolean
isNavigationRequest
Whether this is a navigation request, which can abort the navigation completely.String
redirectUrl
Redirect location, only sent if a redirect was intercepted.Network.Request
request
[No Description Provided by Google]
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.String
resourceType
How the requested resource will be used.String
responseErrorReason
Response error if intercepted at response stage or if redirect occurred while intercepting request.JsonObject
responseHeaders
Response headers if intercepted at the response stage or if redirect occurred while intercepting request or auth retry occurred.Integer
responseStatusCode
Response code if intercepted at response stage or if redirect occurred while intercepting request or auth retry occurred.-
Fields inherited from class Torello.Browser.BrowserEvent
domain, name, numFields
-
-
Constructor Summary
Constructors Constructor Description requestIntercepted(String interceptionId, Network.Request request, String frameId, String resourceType, boolean isNavigationRequest, Boolean isDownload, String redirectUrl, Network.AuthChallenge authChallenge, String responseErrorReason, Integer responseStatusCode, JsonObject responseHeaders, String requestId)
ConstructorrequestIntercepted(JsonObject jo)
JSON Object Constructor
-
Method Summary
Generate Array that Indicates which Parameter are Optional Modifier and Type Method boolean[]
optionals()
Implementing this method allows sub-classes to specify which JSON Properties may be absent or null.Methods: class java.lang.Object Modifier and Type Method boolean
equals(Object other)
Checks whether'this'
equals an input Java-Object
int
hashCode()
Generates a Hash-Code for'this'
instance
-
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
For Object Serialization. java.io.Serializable- See Also:
- Constant Field Values
-
interceptionId
public final 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.
-
request
public final Network.Request request
[No Description Provided by Google]
-
frameId
public final java.lang.String frameId
The id of the frame that initiated the request.
-
resourceType
public final java.lang.String resourceType
How the requested resource will be used.
-
isNavigationRequest
public final boolean isNavigationRequest
Whether this is a navigation request, which can abort the navigation completely.
-
isDownload
public final 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).
OPTIONAL
-
redirectUrl
public final java.lang.String redirectUrl
Redirect location, only sent if a redirect was intercepted.
OPTIONAL
-
authChallenge
public final Network.AuthChallenge authChallenge
Details of the Authorization Challenge encountered. If this is set then continueInterceptedRequest must contain an authChallengeResponse.
OPTIONAL
-
responseErrorReason
public final java.lang.String responseErrorReason
Response error if intercepted at response stage or if redirect occurred while intercepting request.
OPTIONAL
-
responseStatusCode
public final java.lang.Integer responseStatusCode
Response code if intercepted at response stage or if redirect occurred while intercepting request or auth retry occurred.
OPTIONAL
-
responseHeaders
public final JsonObject responseHeaders
Response headers if intercepted at the response stage or if redirect occurred while intercepting request or auth retry occurred.
OPTIONAL
-
requestId
public final 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.
OPTIONAL
-
-
Constructor Detail
-
requestIntercepted
public requestIntercepted(java.lang.String interceptionId, Network.Request request, java.lang.String frameId, java.lang.String resourceType, boolean isNavigationRequest, java.lang.Boolean isDownload, java.lang.String redirectUrl, Network.AuthChallenge authChallenge, java.lang.String responseErrorReason, java.lang.Integer responseStatusCode, JsonObject responseHeaders, java.lang.String requestId)
Constructor- Parameters:
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.request
- -frameId
- The id of the frame that initiated the request.resourceType
- How the requested resource will be used.isNavigationRequest
- Whether this is a navigation request, which can abort the navigation completely.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).
OPTIONALredirectUrl
- Redirect location, only sent if a redirect was intercepted.
OPTIONALauthChallenge
- Details of the Authorization Challenge encountered. If this is set then continueInterceptedRequest must contain an authChallengeResponse.
OPTIONALresponseErrorReason
- Response error if intercepted at response stage or if redirect occurred while intercepting request.
OPTIONALresponseStatusCode
- Response code if intercepted at response stage or if redirect occurred while intercepting request or auth retry occurred.
OPTIONALresponseHeaders
- Response headers if intercepted at the response stage or if redirect occurred while intercepting request or auth retry occurred.
OPTIONALrequestId
- 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.
OPTIONAL
-
requestIntercepted
public requestIntercepted(JsonObject jo)
JSON Object Constructor- Parameters:
jo
- A Json-Object having data about an instance of'requestIntercepted'
.
-
-
Method Detail
-
optionals
public boolean[] optionals()
Description copied from class:BaseType
Implementing this method allows sub-classes to specify which JSON Properties may be absent or null. When binding aJsonObject
to a Java-Object, if some of the expected fields for the Java-Object map to Properties which might be left-out or omitted, then that may be indicated by setting that fields array positionTRUE
.
NOTE: This array should have a length equal to the number of fields contained by the Java Object. The first boolean in the array should specify whether the first Object Field may by absent. The second boolean should specify whether the second Object Field is optional in the JSON - and so on and so forth...
-
equals
public boolean equals(java.lang.Object other)
Checks whether'this'
equals an input Java-Object
- Overrides:
equals
in classjava.lang.Object
- Code:
- Exact Method Body:
if (other == null) return false; if (other.getClass() != this.getClass()) return false; requestIntercepted o = (requestIntercepted) other; return Objects.equals(this.interceptionId, o.interceptionId) && Objects.equals(this.request, o.request) && Objects.equals(this.frameId, o.frameId) && Objects.equals(this.resourceType, o.resourceType) && (this.isNavigationRequest == o.isNavigationRequest) && Objects.equals(this.isDownload, o.isDownload) && Objects.equals(this.redirectUrl, o.redirectUrl) && Objects.equals(this.authChallenge, o.authChallenge) && Objects.equals(this.responseErrorReason, o.responseErrorReason) && Objects.equals(this.responseStatusCode, o.responseStatusCode) && Objects.equals(this.responseHeaders, o.responseHeaders) && Objects.equals(this.requestId, o.requestId);
-
hashCode
public int hashCode()
Generates a Hash-Code for'this'
instance- Overrides:
hashCode
in classjava.lang.Object
- Code:
- Exact Method Body:
return Objects.hashCode(this.interceptionId) + this.request.hashCode() + Objects.hashCode(this.frameId) + Objects.hashCode(this.resourceType) + (this.isNavigationRequest ? 1 : 0) + Objects.hashCode(this.isDownload) + Objects.hashCode(this.redirectUrl) + this.authChallenge.hashCode() + Objects.hashCode(this.responseErrorReason) + Objects.hashCode(this.responseStatusCode) + this.responseHeaders.hashCode() + Objects.hashCode(this.requestId);
-
-