Package Torello.Browser.BrowserAPI
Class Network.requestIntercepted
- java.lang.Object
-
- Torello.Browser.BaseType<DOMAIN_NESTED>
-
- Torello.Browser.BrowserEvent<Network.requestIntercepted>
-
- Torello.Browser.BrowserAPI.Network.requestIntercepted
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<BaseType<?>>
- Enclosing class:
- Network
public static class Network.requestIntercepted extends BrowserEvent<Network.requestIntercepted> implements java.io.Serializable
This Nested Java Class is declared as an Event-Type by the CDP API Specifications. This class largely functions as a data container or "data record", and encapsulates the datum values that Google Chrome is incorporating into the event that it is firing.
📌 All browser domain event classes will have a class name that begins with a lower case letter.
👉 Note that this particular event can be fired by theNetworkdomain, located in theBrowserAPI. A browser 'domain' is quite similar to a Java Package. It incorporates a suite of features, types and functions under one umbrella.Details of an intercepted HTTP request, which must be either allowed, blocked, modified or mocked. Deprecated, use Fetch.requestPaused instead.
EXPERIMENTALDEPRECATED- See Also:
- Serialized Form
Hi-Lited Source-Code:This File's Source Code:
- View Here: Torello/Browser/BrowserAPI/Network.java
- Open New Browser-Tab: Torello/Browser/BrowserAPI/Network.java
File Size: 5,766 Bytes Line Count: 130 '\n' Characters Found
Helper: Equals, HashCode, toJSON, etc
- View Here: Network$$requestIntercepted$$.java
- Open New Browser-Tab: Network$$requestIntercepted$$.java
File Size: 14,918 Bytes Line Count: 346 '\n' Characters Found
-
-
Field Summary
Serializable ID Modifier and Type Field Description protected static longserialVersionUIDType Fields / Properties (from Google & Browser Specs) Modifier and Type Field Description Network.AuthChallengeauthChallengeDetails of the Authorization Challenge encountered.StringframeIdThe id of the frame that initiated the request.StringinterceptionIdEach 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.BooleanisDownloadSet if the request is a navigation that will result in a download.booleanisNavigationRequestWhether this is a navigation request, which can abort the navigation completely.StringredirectUrlRedirect location, only sent if a redirect was intercepted.Network.Requestrequest[No Description Provided by Google]StringrequestIdIf 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.StringresourceTypeHow the requested resource will be used.StringresponseErrorReasonResponse error if intercepted at response stage or if redirect occurred while intercepting request.JsonValueresponseHeadersResponse headers if intercepted at the response stage or if redirect occurred while intercepting request or auth retry occurred.IntegerresponseStatusCodeResponse code if intercepted at response stage or if redirect occurred while intercepting request or auth retry occurred.
-
Constructor Summary
Constructors Constructor Description requestIntercepted(ReadOnlyList<Boolean> isPresent, String interceptionId, Network.Request request, String frameId, String resourceType, boolean isNavigationRequest, Boolean isDownload, String redirectUrl, Network.AuthChallenge authChallenge, String responseErrorReason, Integer responseStatusCode, JsonValue responseHeaders, String requestId)Constructor.
-
Method Summary
Static Builder Convert a JsonObject to a POJO Modifier and Type Method Description static Network.requestInterceptedfromJSON(JsonObject jo)Creates an instance of this class from aJsonObject.Retrieve the Type-Descriptor Singleton-Instance for this Nested Class. Modifier and Type Method Description static NestedDescriptor<Network.requestIntercepted>descriptor()Returns this class'sNestedDescriptorsingleton-instance.-
Methods inherited from class Torello.Browser.BaseType
allEnumStrROLs, compareTo, enumStrList, enumStrValidate, enumStrValidateThrow, equals, hashCode, isPresent, optionalsValidate, optionalsValidateThrow, toJSON, toString
-
-
-
-
Field Detail
-
serialVersionUID
protected static final long serialVersionUID
This fulfils the SerialVersion UID requirement for all classes that implement Java'sinterface java.io.Serializable. Using theSerializableImplementation offered by java is very easy, and can make saving program state when debugging a lot easier. It can also be used in place of more complicated systems like "hibernate" to store data as well.- 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.This particular field will have its values resricted to the contents of a CDP defined Enumerated String List. That list may be viewed here:
📎Network.ResourceType
Programmatically Accessing the Enum:
// Retrieve the list of enumerated strings for this field ReadOnlyList<String> enumerationStrs = Network.ResourceType.enumStrList("resourceType"); // Print the list of strings to the terminal for (final String s : enumerationStrs) System.out.println('\"' + s + "\", ");
- See Also:
BaseType.enumStrList(String)
-
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.
OPTIONALThis particular field will have its values resricted to the contents of a CDP defined Enumerated String List. That list may be viewed here:
📎Network.ErrorReason
Programmatically Accessing the Enum:
// Retrieve the list of enumerated strings for this field ReadOnlyList<String> enumerationStrs = Network.ErrorReason.enumStrList("responseErrorReason"); // Print the list of strings to the terminal for (final String s : enumerationStrs) System.out.println('\"' + s + "\", ");
- See Also:
BaseType.enumStrList(String)
-
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 JsonValue 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(ReadOnlyList<java.lang.Boolean> isPresent, 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, JsonValue responseHeaders, java.lang.String requestId)
Constructor. Please review this class' fields for documentation.
-
-
Method Detail
-
fromJSON
public static Network.requestIntercepted fromJSON(JsonObject jo)
Creates an instance of this class from aJsonObject.- Code:
- Exact Method Body:
return singleton.fromJSON(jo);
-
descriptor
public static NestedDescriptor<Network.requestIntercepted> descriptor()
Returns this class'sNestedDescriptorsingleton-instance. class / type.- Code:
- Exact Method Body:
return singleton.descriptor();
-
-