[Response] class represents responses which are received by page.
- returns: <[Buffer]>
Returns the buffer with response body.
- returns: <[null]|[string]>
Waits for this response to finish, returns failure error if request failed.
- returns: <[Frame]>
Returns the [Frame] that initiated this response.
- returns: <[Object]<[string], [string]>>
Returns the object with HTTP headers associated with the response. All header names are lower-case.
- returns: <[Serializable]>
Returns the JSON representation of response body.
This method will throw if the response body is not parsable via JSON.parse
.
- returns: <[boolean]>
Contains a boolean stating whether the response was successful (status in the range 200-299) or not.
- returns: <[Request]>
Returns the matching [Request] object.
- returns: <[int]>
Contains the status code of the response (e.g., 200 for a success).
- returns: <[string]>
Contains the status text of the response (e.g. usually an "OK" for a success).
- returns: <[string]>
Returns the text representation of response body.
- returns: <[string]>
Contains the URL of the response.