jspωiki
Fetch API

Overview#

Fetch API provides an interface for fetching resources (including across the network).

Fetch API provides a generic definition of Request and Response objects (and other things involved with network requests). This will allow them to be used wherever they are needed in the future, whether it’s for Service Workers, Cache API and other similar things that handle or modify requests and responses, or any kind of Use case that might require you to generate your own responses programmatically.

Fetch API also provides a definition for related concepts such as CORS and the HTTP Header Field Origin header semantics, supplanting their separate definitions elsewhere. (RFC 6454)

Fetch API is JavaScript’s way of sending HTTP Request over the wire and is therefore vital to making any real-world JavaScript application with any kind of a backend server behind it.

Fetch API is used in JavaScript Promises and Async-Await

More Information#

There might be more information for this subject on one of the following: