liveBook · Manning

Fetch API

Also called fetch function

The Fetch API is a web-platform interface for making network requests and processing their responses asynchronously through promises.

How 2 Manning books explain it

Vanilla Web

A function of the Fetch API that initiates a network request and returns a promise for its response.

How it is used
Uses browser-native HTTP requests to retrieve and send application data without a client library.
How deep it goes
Works through request options, response parsing, status checks, credentials and streaming, while noting limits on precise upload progress.
Examples
Shows a JSON book request, a reusable request helper, credentialed account requests and a streaming download-progress function.
What you can do after
Apply it via fetch() to make HTTP requests with explicit parsing, error checks, credentials and cancellation.

Read how Vanilla Web explains Fetch API →

JavaScript in Depth

A web-standard JavaScript API for making asynchronous network requests that returns promises for HTTP responses.

How it is used
Bridges asynchronous HTTP requests with Web Stream response bodies.
How deep it goes
Contrasts browser, Node.js, and platform stream behavior, but stops short of detailing fetch request options.
Examples
Uses browser fetch(), Node.js fetch(), http.createServer(), Node.js transforms, and stream.pipeline() as boundary cases.
What you can do after
Operate fetch responses by selecting Web Stream composition or explicit Node.js adaptation.

Read how JavaScript in Depth explains Fetch API →

Also covered in

What to know first

Related concepts

Questions about Fetch API

What is Fetch API?

The Fetch API is a web-platform interface for making network requests and processing their responses asynchronously through promises.

Which Manning books explain Fetch API?

Vanilla Web and JavaScript in Depth.

What should I know before learning Fetch API?

Manning books that teach Fetch API usually introduce JSON and HTTP first.

What is the difference between Fetch API and XMLHttpRequest?

The Fetch API is a web-platform interface for making network requests and processing their responses asynchronously through promises. XMLHttpRequest is a browser API interface that enables scripts to send HTTP requests and receive and process their responses.

What is Fetch API also called?

Fetch API is also called fetch function.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.