Class Network.responseReceivedExtraInfo

  • Enclosing class:
    Network

    public static class Network.responseReceivedExtraInfo
    extends BrowserEvent
    Fired when additional information about a responseReceived event is available from the network stack. Not every responseReceived event will have an additional responseReceivedExtraInfo for it, and responseReceivedExtraInfo may be fired before or after responseReceived.

    EXPERIMENTAL


    • Field Detail

      • requestId

        🡅  🡇     🗕  🗗  🗖
        public final java.lang.String requestId
        Request identifier. Used to match this information to another responseReceived event.
      • blockedCookies

        🡅  🡇     🗕  🗗  🗖
        public final Network.BlockedSetCookieWithReason[] blockedCookies
        A list of cookies which were not stored from the response along with the corresponding reasons for blocking. The cookies here may not be valid due to syntax errors, which are represented by the invalid cookie line string instead of a proper cookie.
      • resourceIPAddressSpace

        🡅  🡇     🗕  🗗  🗖
        public final java.lang.String resourceIPAddressSpace
        The IP address space of the resource. The address space can only be determined once the transport established the connection, so we can't send it in requestWillBeSentExtraInfo.
      • statusCode

        🡅  🡇     🗕  🗗  🗖
        public final int statusCode
        The status code of the response. This is useful in cases the request failed and no responseReceived event is triggered, which is the case for, e.g., CORS errors. This is also the correct status code for cached requests, where the status in responseReceived is a 200 and this will be 304.
      • headersText

        🡅  🡇     🗕  🗗  🗖
        public final java.lang.String headersText
        Raw response header text as it was received over the wire. The raw text may not always be available, such as in the case of HTTP/2 or QUIC.

        OPTIONAL
    • Constructor Detail

      • responseReceivedExtraInfo

        🡅  🡇     🗕  🗗  🗖
        public responseReceivedExtraInfo​
                    (java.lang.String requestId,
                     Network.BlockedSetCookieWithReason[] blockedCookies,
                     JsonObject headers,
                     java.lang.String resourceIPAddressSpace,
                     int statusCode,
                     java.lang.String headersText)
        
        Constructor
        Parameters:
        requestId - Request identifier. Used to match this information to another responseReceived event.
        blockedCookies - A list of cookies which were not stored from the response along with the corresponding reasons for blocking. The cookies here may not be valid due to syntax errors, which are represented by the invalid cookie line string instead of a proper cookie.
        headers - Raw response headers as they were received over the wire.
        resourceIPAddressSpace - The IP address space of the resource. The address space can only be determined once the transport established the connection, so we can't send it in requestWillBeSentExtraInfo.
        statusCode - The status code of the response. This is useful in cases the request failed and no responseReceived event is triggered, which is the case for, e.g., CORS errors. This is also the correct status code for cached requests, where the status in responseReceived is a 200 and this will be 304.
        headersText - Raw response header text as it was received over the wire. The raw text may not always be available, such as in the case of HTTP/2 or QUIC.
        OPTIONAL
    • 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.