Introduction

The WixFetchResponse object contains information about an HTTP response. More functionality is available in each of the respective Fetch API implementations.

Did this help?

bodyUsed


bodyUsedbooleanRead-only

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.

JavaScript
Did this help?

headers


headersHeadersRead-only

The response headers.

JavaScript
Did this help?

ok


okbooleanRead-only

Indicates if the request was successful, meaning its status is in the range 2xx.

JavaScript
Did this help?

status


statusnumberRead-only

The response status code.

JavaScript
Did this help?

statusText


statusTextstringRead-only

The response status message.

JavaScript
Did this help?

url


urlstringRead-only

The response URL.

JavaScript
let url = httpResponse.url; // "https://someapi.com/api/someendpoint"
Did this help?