Class APIResponseImpl

java.lang.Object
com.microsoft.playwright.impl.APIResponseImpl
All Implemented Interfaces:
APIResponse

class APIResponseImpl extends Object implements APIResponse
  • Field Details

    • context

      final APIRequestContextImpl context
    • initializer

      private final com.google.gson.JsonObject initializer
    • headers

      private final RawHeaders headers
  • Constructor Details

    • APIResponseImpl

      APIResponseImpl(APIRequestContextImpl apiRequestContext, com.google.gson.JsonObject response)
  • Method Details

    • body

      public byte[] body()
      Description copied from interface: APIResponse
      Returns the buffer with response body.
      Specified by:
      body in interface APIResponse
    • dispose

      public void dispose()
      Description copied from interface: APIResponse
      Disposes the body of this response. If not called then the body will stay in memory until the context closes.
      Specified by:
      dispose in interface APIResponse
    • headers

      public Map<String,String> headers()
      Description copied from interface: APIResponse
      An object with all the response HTTP headers associated with this response.
      Specified by:
      headers in interface APIResponse
    • headersArray

      public List<HttpHeader> headersArray()
      Description copied from interface: APIResponse
      An array with all the request HTTP headers associated with this response. Header names are not lower-cased. Headers with multiple entries, such as Set-Cookie, appear in the array multiple times.
      Specified by:
      headersArray in interface APIResponse
    • ok

      public boolean ok()
      Description copied from interface: APIResponse
      Contains a boolean stating whether the response was successful (status in the range 200-299) or not.
      Specified by:
      ok in interface APIResponse
    • status

      public int status()
      Description copied from interface: APIResponse
      Contains the status code of the response (e.g., 200 for a success).
      Specified by:
      status in interface APIResponse
    • statusText

      public String statusText()
      Description copied from interface: APIResponse
      Contains the status text of the response (e.g. usually an "OK" for a success).
      Specified by:
      statusText in interface APIResponse
    • text

      public String text()
      Description copied from interface: APIResponse
      Returns the text representation of response body.
      Specified by:
      text in interface APIResponse
    • url

      public String url()
      Description copied from interface: APIResponse
      Contains the URL of the response.
      Specified by:
      url in interface APIResponse
    • fetchUid

      String fetchUid()
    • fetchLog

      List<String> fetchLog()