English · Java
Appearance
English · Java
Appearance
APIResponse class represents responses returned by apiRequestContext.get() and similar methods.
Returns the buffer with response body.
Returns
BufferDisposes 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.
Returns
Object<string, string>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.
Returns
Array<Object>Contains a boolean stating whether the response was successful (status in the range 200-299) or not.
Returns
booleanReturns 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
null | ObjectReturns 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.
Returns
null | ObjectContains the status code of the response (e.g., 200 for a success).
Returns
intContains the status text of the response (e.g. usually an "OK" for a success).
Returns
stringReturns the text representation of response body.
Returns
stringReturns 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.
Returns
ObjectContains the URL of the response.
Returns
string