Class Network.Request

    • 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)
      Constructor
      Request​(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
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • 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.
        OPTIONAL
        method - HTTP request method.
        headers - HTTP request headers.
        postData - HTTP POST request data.
        OPTIONAL
        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 - Request body elements. This will be converted from base64 to binary
        OPTIONAL
        EXPERIMENTAL
        mixedContentType - The mixed content type of the request.
        OPTIONAL
        initialPriority - 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.
        OPTIONAL
        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 - True if this resource request is considered to be the 'same site' as the request correspondinfg to the main frame.
        OPTIONAL
        EXPERIMENTAL
    • 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 a JsonObject 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 position TRUE.

        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...
        Specified by:
        optionals in class BaseType
        Returns:
        A boolean[] array whose length is precisely equal to the number of fields in the Java Object.
        Code:
        Exact Method Body:
         return new boolean[] { false, true, false, false, true, true, true, true, false, false, true, true, true, };
        
      • equals

        🡅  🡇     🗕  🗗  🗖
        public boolean equals​(java.lang.Object other)
        Checks whether 'this' equals an input Java-Object
        Overrides:
        equals in class java.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 class java.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);