This is the event type for
fetch events. It contains information about the fetch, including the request and how the receiver will treat the response.
It provides the
event.respondWith() method, which allows us to provide a response to this fetch.
- : The
Requestthat was received by the application.
- : The
- : Information about the downstream client that made the request.
- : A string representation of the IPv4 or IPv6 address of the downstream client.
- : A geolocation dictionary corresponding to the IP address of the downstream client.
- : Provide (a promise for) a response for this request.
- : Extends the lifetime of the event. Used to notify the host environment of tasks that extend beyond the returning of a response, such as streaming and caching.