Returns the buffer with response body.
Disposes the body of this response. If not called then the body will stay in memory until the context closes.
An object with all the response HTTP headers associated with this response.
An array with all the response 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.
Name of the header.
Value of the header.
Returns the JSON representation of response body.
This method will throw if the response body is not parsable via JSON.parse.
Contains a boolean stating whether the response was successful (status in the range 200-299) or not.
Returns SSL and other security information. Resolves to null for non-HTTPS responses. For redirected requests,
returns the information for the last request in the redirect chain.
Returns the IP address and port of the server. Resolves to null if the server address is not available. For
redirected requests, returns the information for the last request in the redirect chain.
Contains the status code of the response (e.g., 200 for a success).
Contains the status text of the response (e.g. usually an "OK" for a success).
Returns the text representation of response body.
Returns resource timing information for given response. For redirected requests, returns the information for the last request in the redirect chain. When the response is served from the HAR file, timing information is not available and all the values are -1. Find more information at Resource Timing API.
Time immediately after the client establishes the connection to the server to retrieve the resource. The value is
given in milliseconds relative to startTime, -1 if not available.
Time immediately before the client starts establishing the connection to the server to retrieve the resource. The
value is given in milliseconds relative to startTime, -1 if not available.
Time immediately after the client ends the domain name lookup for the resource. The value is given in milliseconds
relative to startTime, -1 if not available.
Time immediately before the client starts the domain name lookup for the resource. The value is given in
milliseconds relative to startTime, -1 if not available.
Time immediately before the client starts requesting the resource from the server, cache, or local resource. The
value is given in milliseconds relative to startTime, -1 if not available.
Time immediately after the client receives the last byte of the resource or immediately before the transport
connection is closed, whichever comes first. The value is given in milliseconds relative to startTime, -1 if not
available.
Time immediately after the client receives the first byte of the response from the server, cache, or local
resource. The value is given in milliseconds relative to startTime, -1 if not available.
Time immediately before the client starts the handshake process to secure the current connection. The value is
given in milliseconds relative to startTime, -1 if not available.
Request start time in milliseconds elapsed since January 1, 1970 00:00:00 UTC
Contains the URL of the response.
APIResponse class represents responses returned by apiRequestContext.get(url[, options]) and similar methods.