Represents an HTTP response.
Gets the body of the response as
This can only be called once. Subsequent accesses will throw a
Returns whether the body has already been used and subsequent accesses would throw.
Gets the HTTP response headers.
Returns whether the response's status code indicates success.
Success is defined as HTTP status codes 200-299 (inclusive).
Returns whether the response was redirected.
Returns the HTTP status code.
Returns the status message corresponding to the status code.
Gets the URL that was ultimately fetched (after redirects).
Returns a promise that resolves with the response data read into an ArrayBuffer.
Be aware, this reads the entire response into memory, and thus may easily exceed your heap limit.
Attempts to deserialize the response body as JSON.
Reads the response body to a string. The text is decoded using UTF-8.
Generated using TypeDoc