Github iconEdit on Github



The Fetch API provides an interface for asyncronously fetching resources by providing a definition of a request and response. You will frequently find yourself interacting with request objects included as part of a FetchEvent, making your own requests using the global fetch method, and constructing your own responses.

*Note: The Fetch API is only available inside of the Request Context.


The fetch method is implemented on the ServiceWorkerGlobalScope and matches the documentation provided by MDN


The Headers class matches the documentation provided by MDN. If you expect Unicode values in your headers, URL or Base64 encode your header values before adding them to a Headers object.

Cloudflare Specific Headers

CF-Connecting-IP: The client IP