Fetch API
The Fetch API is a web-platform interface for making network requests and processing their responses asynchronously through promises.
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.
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.
Also covered in
- Building User-Friendly DSLs
- Bootstrapping Microservices, Second Edition: With Docker, Kubernetes, GitHub Actions, and Terraform
- React Hooks in Action: With Suspense and Concurrent Mode
- Build a Website with ChatGPT
- Modern Angular
- Pro ASP.NET Core 7, Tenth Edition
- Acing the Frontend InterviewIn early access (MEAP)
What to know first
- JSONJSON is a language-independent text-based data-interchange format that represents structured values using objects, arrays, strings, numbers, booleans, and null.
- HTTPHTTP is an application-layer protocol that defines request-and-response communication for transferring resource representations and related metadata between networked systems.
Related concepts
- promiseproduces · A JavaScript Promise is an object representing the eventual completion or failure of an asynchronous operation and its resulting value or reason.
- Axiosalternative to · Axios is a promise-based JavaScript HTTP client library for making requests and handling responses in browsers and server-side JavaScript environments.
- JavaScriptused by · JavaScript is a high-level, dynamically typed programming language standardized as ECMAScript and used for web and general-purpose programming.
- AbortControllerused by · AbortController is a web API interface that creates a signal for communicating cancellation to abortable asynchronous operations.
- client-side renderingused by · Client-side rendering is the generation or updating of a web interface in a user's browser by code executed there.
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.

