Package Torello.Browser.BrowserAPI
Class Network.Request
- java.lang.Object
-
- Torello.Browser.BaseType<Network.Request>
-
- Torello.Browser.BrowserAPI.Network.Request
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<BaseType<?>>
- Enclosing class:
- Network
public static class Network.Request extends BaseType<Network.Request> implements java.io.Serializable
This Nested Java Class is declared as a "Type", which is similar to a Java Class. The CDP API Specifications list this type among the types, events & commands located in theNetworkdomain, which may be found within theBrowserAPI.
📌 All browser domain type classes will have a class name that begins with an upper case letter.HTTP request data.- 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,307 Bytes Line Count: 131 '\n' Characters Found
Helper: Equals, HashCode, toJSON, etc
- View Here: Network$$Request$$.java
- Open New Browser-Tab: Network$$Request$$.java
File Size: 16,108 Bytes Line Count: 375 '\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 BooleanhasPostDataTrue when the request has POST data.JsonValueheadersHTTP request headers.StringinitialPriorityPriority of the resource request at the time request is sent.BooleanisLinkPreloadWhether is loaded via link preload.BooleanisSameSiteTrue if this resource request is considered to be the 'same site' as the request corresponding to the main frame.StringmethodHTTP request method.StringmixedContentTypeThe mixed content type of the request.StringpostDataHTTP POST request data.Network.PostDataEntry[]postDataEntriesRequest body elements (post data broken into individual entries).StringreferrerPolicyThe referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/Network.TrustTokenParamstrustTokenParamsSet for requests when the TrustToken API is used.StringurlRequest URL (without fragment).StringurlFragmentFragment of the requested URL starting with hash, if present.
-
Constructor Summary
Constructors Constructor Description Request(ReadOnlyList<Boolean> isPresent, String url, String urlFragment, String method, JsonValue headers, String postData, Boolean hasPostData, Network.PostDataEntry[] postDataEntries, String mixedContentType, String initialPriority, String referrerPolicy, Boolean isLinkPreload, Network.TrustTokenParams trustTokenParams, Boolean isSameSite)Constructor.
-
Method Summary
Static Builder Convert a JsonObject to a POJO Modifier and Type Method Description static Network.RequestfromJSON(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.Request>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
-
url
public final java.lang.String url
Request URL (without fragment).
-
urlFragment
public final java.lang.String urlFragment
Fragment of the requested URL starting with hash, if present.
OPTIONAL
-
method
public final java.lang.String method
HTTP request method.
-
headers
-
postData
public final java.lang.String postData
HTTP POST request data. Use postDataEntries instead.
OPTIONALDEPRECATED
-
hasPostData
public final java.lang.Boolean hasPostData
True when the request has POST data. Note that postData might still be omitted when this flag is true when the data is too long.
OPTIONAL
-
postDataEntries
public final Network.PostDataEntry[] postDataEntries
Request body elements (post data broken into individual entries).
OPTIONALEXPERIMENTAL
-
mixedContentType
public final java.lang.String mixedContentType
The mixed content type of the 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:
📎Security.MixedContentType
Programmatically Accessing the Enum:
// Retrieve the list of enumerated strings for this field ReadOnlyList<String> enumerationStrs = Security.MixedContentType.enumStrList("mixedContentType"); // Print the list of strings to the terminal for (final String s : enumerationStrs) System.out.println('\"' + s + "\", ");
- See Also:
BaseType.enumStrList(String)
-
initialPriority
public final java.lang.String initialPriority
Priority of the resource request at the time request is sent.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.ResourcePriority
Programmatically Accessing the Enum:
// Retrieve the list of enumerated strings for this field ReadOnlyList<String> enumerationStrs = Network.ResourcePriority.enumStrList("initialPriority"); // Print the list of strings to the terminal for (final String s : enumerationStrs) System.out.println('\"' + s + "\", ");
- See Also:
BaseType.enumStrList(String)
-
referrerPolicy
public final java.lang.String referrerPolicy
The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/This particular field will have its values resricted to the contents of a CDP defined Enumerated String List. That list may be viewed inside the hilited source code from this class nested helper. Click the link below, and scroll down to find the definition for aReadOnlyList<String>named'referrerPolicy$$':
📎Network$$Request$$
Programmatically Accessing the Enum:
// Retrieve the list of enumerated strings for this field ReadOnlyList<String> enumerationStrs = Network.Request.enumStrList("referrerPolicy"); // Print the list of strings to the terminal for (final String s : enumerationStrs) System.out.println('\"' + s + "\", ");
- See Also:
BaseType.enumStrList(String)
-
isLinkPreload
public final java.lang.Boolean isLinkPreload
Whether is loaded via link preload.
OPTIONAL
-
trustTokenParams
public final Network.TrustTokenParams trustTokenParams
Set for requests when the TrustToken API is used. Contains the parameters passed by the developer (e.g. via "fetch") as understood by the backend.
OPTIONALEXPERIMENTAL
-
isSameSite
public final java.lang.Boolean isSameSite
True if this resource request is considered to be the 'same site' as the request corresponding to the main frame.
OPTIONALEXPERIMENTAL
-
-
Constructor Detail
-
Request
public Request(ReadOnlyList<java.lang.Boolean> isPresent, java.lang.String url, java.lang.String urlFragment, java.lang.String method, JsonValue headers, java.lang.String postData, java.lang.Boolean hasPostData, Network.PostDataEntry[] postDataEntries, java.lang.String mixedContentType, java.lang.String initialPriority, java.lang.String referrerPolicy, java.lang.Boolean isLinkPreload, Network.TrustTokenParams trustTokenParams, java.lang.Boolean isSameSite)
Constructor. Please review this class' fields for documentation.
-
-
Method Detail
-
fromJSON
public static Network.Request fromJSON(JsonObject jo)
Creates an instance of this class from aJsonObject.- Code:
- Exact Method Body:
return singleton.fromJSON(jo);
-
descriptor
public static NestedDescriptor<Network.Request> descriptor()
Returns this class'sNestedDescriptorsingleton-instance. class / type.- Code:
- Exact Method Body:
return singleton.descriptor();
-
-