Class Response


  • public class Response
    extends java.lang.Object
    HTTP response data.
    • Constructor Summary

      Constructors 
      Constructor Description
      Response​(java.lang.String url, java.lang.Integer status, java.lang.String statusText, Headers headers, java.util.Optional<java.lang.String> headersText, java.lang.String mimeType, java.util.Optional<Headers> requestHeaders, java.util.Optional<java.lang.String> requestHeadersText, java.lang.Boolean connectionReused, java.lang.Number connectionId, java.util.Optional<java.lang.String> remoteIPAddress, java.util.Optional<java.lang.Integer> remotePort, java.util.Optional<java.lang.Boolean> fromDiskCache, java.util.Optional<java.lang.Boolean> fromServiceWorker, java.util.Optional<java.lang.Boolean> fromPrefetchCache, java.lang.Number encodedDataLength, java.util.Optional<ResourceTiming> timing, java.util.Optional<java.lang.String> protocol, SecurityState securityState, java.util.Optional<SecurityDetails> securityDetails)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Number getConnectionId()
      Physical connection id that was actually used for this request.
      java.lang.Boolean getConnectionReused()
      Specifies whether physical connection was actually reused for this request.
      java.lang.Number getEncodedDataLength()
      Total number of bytes received for this request so far.
      java.util.Optional<java.lang.Boolean> getFromDiskCache()
      Specifies that the request was served from the disk cache.
      java.util.Optional<java.lang.Boolean> getFromPrefetchCache()
      Specifies that the request was served from the prefetch cache.
      java.util.Optional<java.lang.Boolean> getFromServiceWorker()
      Specifies that the request was served from the ServiceWorker.
      Headers getHeaders()
      HTTP response headers.
      java.util.Optional<java.lang.String> getHeadersText()
      HTTP response headers text.
      java.lang.String getMimeType()
      Resource mimeType as determined by the browser.
      java.util.Optional<java.lang.String> getProtocol()
      Protocol used to fetch this request.
      java.util.Optional<java.lang.String> getRemoteIPAddress()
      Remote IP address.
      java.util.Optional<java.lang.Integer> getRemotePort()
      Remote port.
      java.util.Optional<Headers> getRequestHeaders()
      Refined HTTP request headers that were actually transmitted over the network.
      java.util.Optional<java.lang.String> getRequestHeadersText()
      HTTP request headers text.
      java.util.Optional<SecurityDetails> getSecurityDetails()
      Security details for the request.
      SecurityState getSecurityState()
      Security state of the request resource.
      java.lang.Integer getStatus()
      HTTP response status code.
      java.lang.String getStatusText()
      HTTP response status text.
      java.util.Optional<ResourceTiming> getTiming()
      Timing information for the given request.
      java.lang.String getUrl()
      Response URL.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Response

        public Response​(java.lang.String url,
                        java.lang.Integer status,
                        java.lang.String statusText,
                        Headers headers,
                        java.util.Optional<java.lang.String> headersText,
                        java.lang.String mimeType,
                        java.util.Optional<Headers> requestHeaders,
                        java.util.Optional<java.lang.String> requestHeadersText,
                        java.lang.Boolean connectionReused,
                        java.lang.Number connectionId,
                        java.util.Optional<java.lang.String> remoteIPAddress,
                        java.util.Optional<java.lang.Integer> remotePort,
                        java.util.Optional<java.lang.Boolean> fromDiskCache,
                        java.util.Optional<java.lang.Boolean> fromServiceWorker,
                        java.util.Optional<java.lang.Boolean> fromPrefetchCache,
                        java.lang.Number encodedDataLength,
                        java.util.Optional<ResourceTiming> timing,
                        java.util.Optional<java.lang.String> protocol,
                        SecurityState securityState,
                        java.util.Optional<SecurityDetails> securityDetails)
    • Method Detail

      • getUrl

        public java.lang.String getUrl()
        Response URL. This URL can be different from CachedResource.url in case of redirect.
      • getStatus

        public java.lang.Integer getStatus()
        HTTP response status code.
      • getStatusText

        public java.lang.String getStatusText()
        HTTP response status text.
      • getHeaders

        public Headers getHeaders()
        HTTP response headers.
      • getHeadersText

        public java.util.Optional<java.lang.String> getHeadersText()
        HTTP response headers text.
      • getMimeType

        public java.lang.String getMimeType()
        Resource mimeType as determined by the browser.
      • getRequestHeaders

        public java.util.Optional<Headers> getRequestHeaders()
        Refined HTTP request headers that were actually transmitted over the network.
      • getRequestHeadersText

        public java.util.Optional<java.lang.String> getRequestHeadersText()
        HTTP request headers text.
      • getConnectionReused

        public java.lang.Boolean getConnectionReused()
        Specifies whether physical connection was actually reused for this request.
      • getConnectionId

        public java.lang.Number getConnectionId()
        Physical connection id that was actually used for this request.
      • getRemoteIPAddress

        public java.util.Optional<java.lang.String> getRemoteIPAddress()
        Remote IP address.
      • getRemotePort

        public java.util.Optional<java.lang.Integer> getRemotePort()
        Remote port.
      • getFromDiskCache

        public java.util.Optional<java.lang.Boolean> getFromDiskCache()
        Specifies that the request was served from the disk cache.
      • getFromServiceWorker

        public java.util.Optional<java.lang.Boolean> getFromServiceWorker()
        Specifies that the request was served from the ServiceWorker.
      • getFromPrefetchCache

        public java.util.Optional<java.lang.Boolean> getFromPrefetchCache()
        Specifies that the request was served from the prefetch cache.
      • getEncodedDataLength

        public java.lang.Number getEncodedDataLength()
        Total number of bytes received for this request so far.
      • getTiming

        public java.util.Optional<ResourceTiming> getTiming()
        Timing information for the given request.
      • getProtocol

        public java.util.Optional<java.lang.String> getProtocol()
        Protocol used to fetch this request.
      • getSecurityState

        public SecurityState getSecurityState()
        Security state of the request resource.
      • getSecurityDetails

        public java.util.Optional<SecurityDetails> getSecurityDetails()
        Security details for the request.