fetch()won't reject on an HTTP error status even if the response is an HTTP 404 or 500. Instead, it will resolve normally, and it will only reject on a network failure, or if anything prevented the request from completing.
fetch()won't send any cookies to the server, resulting in unauthenticated requests if the site relies on maintaining a user session.
fetch.Authprovides helper functions for
tokenauthorization headers. For example, the
basichelper correctly format encodes the username and password into a valid
fetchpromise will be rejected only for network errors. Use
.caught(compatibility alias for
response.ok. It is recommended to do this in every response handler.