java.lang.Object
org.openqa.selenium.devtools.v141.network.model.Response

public class Response extends Object
HTTP response data.
  • Constructor Details

  • Method Details

    • getUrl

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

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

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

      public Headers getHeaders()
      HTTP response headers.
    • getHeadersText

      @Deprecated public Optional<String> getHeadersText()
      Deprecated.
      HTTP response headers text. This has been replaced by the headers in Network.responseReceivedExtraInfo.
    • getMimeType

      public String getMimeType()
      Resource mimeType as determined by the browser.
    • getCharset

      public String getCharset()
      Resource charset as determined by the browser (if applicable).
    • getRequestHeaders

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

      @Deprecated public Optional<String> getRequestHeadersText()
      Deprecated.
      HTTP request headers text. This has been replaced by the headers in Network.requestWillBeSentExtraInfo.
    • getConnectionReused

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

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

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

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

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

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

      public Optional<Boolean> getFromPrefetchCache()
      Specifies that the request was served from the prefetch cache.
    • getFromEarlyHints

      public Optional<Boolean> getFromEarlyHints()
      Specifies that the request was served from the prefetch cache.
    • getServiceWorkerRouterInfo

      @Beta public Optional<ServiceWorkerRouterInfo> getServiceWorkerRouterInfo()
      Information about how ServiceWorker Static Router API was used. If this field is set with `matchedSourceType` field, a matching rule is found. If this field is set without `matchedSource`, no matching rule is found. Otherwise, the API is not used.
    • getEncodedDataLength

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

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

      public Optional<ServiceWorkerResponseSource> getServiceWorkerResponseSource()
      Response source of response from ServiceWorker.
    • getResponseTime

      public Optional<TimeSinceEpoch> getResponseTime()
      The time at which the returned response was generated.
    • getCacheStorageCacheName

      public Optional<String> getCacheStorageCacheName()
      Cache Storage Cache Name.
    • getProtocol

      public Optional<String> getProtocol()
      Protocol used to fetch this request.
    • getAlternateProtocolUsage

      @Beta public Optional<AlternateProtocolUsage> getAlternateProtocolUsage()
      The reason why Chrome uses a specific transport protocol for HTTP semantics.
    • getSecurityState

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

      public Optional<SecurityDetails> getSecurityDetails()
      Security details for the request.
    • getIsIpProtectionUsed

      @Beta public Optional<Boolean> getIsIpProtectionUsed()
      Indicates whether the request was sent through IP Protection proxies. If set to true, the request used the IP Protection privacy feature.