Implement fetch() in ServiceWorkers

RESOLVED INCOMPLETE

Status

()

defect
RESOLVED INCOMPLETE
5 years ago
2 months ago

People

(Reporter: nsm, Assigned: nsm)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 obsolete attachment)

The fetch() function is available on ServiceWorkerGlobalScope, and asks the UA to make a HTTP request on the ServiceWorker's behalf according to the Fetch specification.

Filing in Necko since most of the work will be exposing Fetch spec semantics via existing HTTP infrastructure.

Relevant specs:
Fetch: http://fetch.spec.whatwg.org/
ServiceWorker: http://slightlyoff.github.io/ServiceWorker/spec/service_worker/index.html

Comment 1

5 years ago
> Filing in Necko since most of the work will be exposing Fetch spec 
> semantics via existing HTTP infrastructure.

This looks more like an XHR-like thing to me (i.e. a bunch of wrapper code around HTTP channels, that doesn't necessarily live in /netwerk).  Jonas, do you have an idea where this code should live?

Updated

5 years ago
Flags: needinfo?(jonas)
Component: Networking: HTTP → DOM: Workers
The code should probably live in contant/base/src or dom/base.

FWIW I would expect that the implementation would look significantly different from the XHR code since most of the XHR code is back-compat cruft and event handling code, neither of which is needed for the fetch() API.
Flags: needinfo?(jonas)
Assignee: gene.lian → nobody
Taking for now since I have some patches.
Assignee: nobody → nsm.nikhil
Closing as dom-fetch-api deals with all of this.
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.