AI Workshop: learn to build apps with AI →
Fetch
How to execute network requests using JavaScript. And how to inspect the Request and Response objects.

Join the AI Workshop and learn to build real-world apps with AI. A hands-on, practical program to level up your skills.


fetch() is the JavaScript built-in API for creating network requests.

Part of the Fetch API specification includes two objects that are key in any server implementation: Request and Response.

Let’s learn the important bits about them.

Lessons in this unit:

0: ▶︎ Introduction
1: How to use Fetch
2: Catching errors in network requests
3: The Response object
4: Getting the body content
5: The Request object
6: Request headers
7: POST requests