Hello, Target release: FF 38 or 39 (feedback requested) Currently hidden behind: dom.fetch.enabled. Bug to enable by default: https://bugzilla.mozilla.org/show_bug.cgi?id=1133861
The Fetch API [1] provides a simpler alternative (the fetch() function) to XMLHttpRequest to fetch resources from the web. At the same time it expresses the underlying platform better by exposing the Request and Response objects. This API is available on Window and Worker. Fetch is also a critical part of the ServiceWorker initiative. According to the spec editor the spec is nearing stabilization. We have had an implementation in the tree for a while that implements most of the spec (see below). While we feel confident in shipping, there are few points of contention where we are looking for clarification before shipping. 1) ESR - FF 38 is an ESR release and shipping a new API with some parts not yet supported may not be the best thing to do. What is the usual policy in such a situation? 2) FormData - N for 38, Y for 39. Patches to add support for FormData in workers and allow FormData to be passed to Request/Response and read back using the formData() method are under review. Blink will be shipping without FormData support, and it is easy to feature detect (by checking for Request.formData) so it is not a risk to ship with this disabled. 3) clone() - Maybe for 38, Y for 39. This will very likely land before 38 branches in which case we will ship it, but it is not in the tree yet. The intention of clone() is to have multiple copies of the body 'stream' available. This is important for ServiceWorkers which often want to cache the data as well as respond to the current request. It is not so useful for window/worker, and we could ship it in 39. Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1073231 4) Request.cache - Google has raised some privacy concerns. So I do not intend to enable this yet. https://github.com/slightlyoff/ServiceWorker/issues/585 5) User prompting for authentication - This is not implemented since the use cases for this are much smaller compared to fetch in general. Instead the 401 response is simply returned as a the result of the fetch, as per spec (Section 4.2, step 4) Intent to implement: https://groups.google.com/forum/#!searchin/mozilla.dev.platform/implement$20fetch/mozilla.dev.platform/EWGghGeRAV0/2DWWR-KPa_IJ Support in other engines: Blink: supports Fetch in ServiceWorkers since 40, and intend to enable it on Window in 42 or 43 - https://groups.google.com/a/chromium.org/forum/#!searchin/blink-dev/fetch$20api/blink-dev/qwRO52vsQlU/CPLC4G6oG9IJ IE: Expressed interest on their dashboard WebKit: No public interest as far as I can tell. Developer documentation: The MDN team has this on their radar and will have documentation ready by the time this hits release. (high chance of it actually being done in March) [1]: http://fetch.spec.whatwg.org/ _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform