Closed Bug 995484 Opened 10 years ago Closed 10 years ago

Implement fetch() in ServiceWorkers

Categories

(Core :: DOM: Workers, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: nsm, Assigned: nsm)

References

Details

Attachments

(1 obsolete file)

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
> 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?
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
Closed: 10 years ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: