response.body()
- returns: <Promise<>> Promise which resolves to a buffer with response body.
response.finished()
- returns: <<?Error>> Waits for this response to finish, returns failure error if request failed.
response.frame()
- returns: <Frame> A that initiated this response.
response.headers()
- returns: <> An object with HTTP headers associated with the response. All header names are lower-case.
response.json()
- returns: <<Object>> Promise which resolves to a JSON representation of response body.
This method will throw if the response body is not parsable via .
response.ok()
- returns: <boolean>
response.request()
- returns: <Request> A matching object.
response.status()
- returns: <>
Contains the status code of the response (e.g., 200 for a success).
response.statusText()
- returns: <>
response.text()
- returns: <<string>> Promise which resolves to a text representation of response body.
response.url()
Contains the URL of the response.