The WixFetchResponse
object contains information about an HTTP response.
More functionality is available in each of the respective Fetch API implementations.
Indicates whether the body of the response has been used yet.
The response's body is considered used once it has been read. For example,
after calling the response's json()
function, the value of
bodyUsed
will be true
.
let wasBodyUsed = httpResponse.bodyUsed; // false
The response headers.
let headers = httpResponse.headers;
Indicates if the request was successful, meaning its status
is in the range 2xx.
let isOk = httpResponse.ok; // true