Request and Response objects

The objects the Fetch API uses to represent an HTTP request and its response, including URL, method, headers and body.

In more detail

A service worker receives a Request in its fetch event and must answer with a Response, from the network, a cache or built by hand. A body can only be read once, so clone the response before both caching and returning it.

Related terms

Taught in

References