Package Torello.Browser
Class Network.Request
- java.lang.Object
-
- Torello.Java.JSON.BaseType
-
- Torello.Browser.Network.Request
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- Network
public static class Network.Request extends BaseType implements java.io.Serializable
HTTP request data.- See Also:
- Serialized Form
Hi-Lited Source-Code:- View Here: Torello/Browser/Network.java
- Open New Browser-Tab: Torello/Browser/Network.java
File Size: 10,945 Bytes Line Count: 241 '\n' Characters Found
-
-
Field Summary
Serializable ID Modifier and Type Field protected static long
serialVersionUID
For Object Serialization.Type Properties Modifier and Type Field Boolean
hasPostData
True when the request has POST data.JsonObject
headers
HTTP request headers.String
initialPriority
Priority of the resource request at the time request is sent.Boolean
isLinkPreload
Whether is loaded via link preload.Boolean
isSameSite
True if this resource request is considered to be the 'same site' as the request correspondinfg to the main frame.String
method
HTTP request method.String
mixedContentType
The mixed content type of the request.String
postData
HTTP POST request data.Network.PostDataEntry[]
postDataEntries
Request body elements.String
referrerPolicy
The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/Network.TrustTokenParams
trustTokenParams
Set for requests when the TrustToken API is used.String
url
Request URL (without fragment).String
urlFragment
Fragment of the requested URL starting with hash, if present.
-
Constructor Summary
Constructors Constructor Description Request(String url, String urlFragment, String method, JsonObject headers, String postData, Boolean hasPostData, Network.PostDataEntry[] postDataEntries, String mixedContentType, String initialPriority, String referrerPolicy, Boolean isLinkPreload, Network.TrustTokenParams trustTokenParams, Boolean isSameSite)
ConstructorRequest(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
-
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
public final JsonObject headers
HTTP request headers.
-
postData
public final java.lang.String postData
HTTP POST request data.
OPTIONAL
-
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. This will be converted from base64 to binary
OPTIONAL
EXPERIMENTAL
-
mixedContentType
public final java.lang.String mixedContentType
The mixed content type of the request.
OPTIONAL
-
initialPriority
public final java.lang.String initialPriority
Priority of the resource request at the time request is sent.
-
referrerPolicy
public final java.lang.String referrerPolicy
The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/
-
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.
OPTIONAL
EXPERIMENTAL
-
isSameSite
public final java.lang.Boolean isSameSite
True if this resource request is considered to be the 'same site' as the request correspondinfg to the main frame.
OPTIONAL
EXPERIMENTAL
-
-
Constructor Detail
-
Request
public Request(java.lang.String url, java.lang.String urlFragment, java.lang.String method, JsonObject 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- Parameters:
url
- Request URL (without fragment).urlFragment
- Fragment of the requested URL starting with hash, if present.
OPTIONALmethod
- HTTP request method.headers
- HTTP request headers.postData
- HTTP POST request data.
OPTIONALhasPostData
- 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.
OPTIONALpostDataEntries
- Request body elements. This will be converted from base64 to binary
OPTIONAL
EXPERIMENTALmixedContentType
- The mixed content type of the request.
OPTIONALinitialPriority
- Priority of the resource request at the time request is sent.referrerPolicy
- The referrer policy of the request, as defined in https://www.w3.org/TR/referrer-policy/
Acceptable Values: ["unsafe-url", "no-referrer-when-downgrade", "no-referrer", "origin", "origin-when-cross-origin", "same-origin", "strict-origin", "strict-origin-when-cross-origin"]isLinkPreload
- Whether is loaded via link preload.
OPTIONALtrustTokenParams
- 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.
OPTIONAL
EXPERIMENTALisSameSite
- True if this resource request is considered to be the 'same site' as the request correspondinfg to the main frame.
OPTIONAL
EXPERIMENTAL
-
Request
public Request(JsonObject jo)
JSON Object Constructor- Parameters:
jo
- A Json-Object having data about an instance of'Request'
.
-
-
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; Request o = (Request) other; return Objects.equals(this.url, o.url) && Objects.equals(this.urlFragment, o.urlFragment) && Objects.equals(this.method, o.method) && Objects.equals(this.headers, o.headers) && Objects.equals(this.postData, o.postData) && Objects.equals(this.hasPostData, o.hasPostData) && Arrays.deepEquals(this.postDataEntries, o.postDataEntries) && Objects.equals(this.mixedContentType, o.mixedContentType) && Objects.equals(this.initialPriority, o.initialPriority) && Objects.equals(this.referrerPolicy, o.referrerPolicy) && Objects.equals(this.isLinkPreload, o.isLinkPreload) && Objects.equals(this.trustTokenParams, o.trustTokenParams) && Objects.equals(this.isSameSite, o.isSameSite);
-
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.url) + Objects.hashCode(this.urlFragment) + Objects.hashCode(this.method) + this.headers.hashCode() + Objects.hashCode(this.postData) + Objects.hashCode(this.hasPostData) + Arrays.deepHashCode(this.postDataEntries) + Objects.hashCode(this.mixedContentType) + Objects.hashCode(this.initialPriority) + Objects.hashCode(this.referrerPolicy) + Objects.hashCode(this.isLinkPreload) + this.trustTokenParams.hashCode() + Objects.hashCode(this.isSameSite);
-
-