Re: [fetch] Aborting a fetch (#27)

Since network is unreliable, callers are expected to handle failures in a graceful way. I don't see a huge difference for the chained promises between abortion of a request and plugging the network cable.

There are two implementors of `fetch`: Chrome (current stable, 42), Firefox (will be enabled by default in 39), so a quick resolution of this issue is needed.

Note for (library) developers: I found that unloading the document or calling `stop()` in Chrome stops all network requests, including `fetch()`. Firefox still continues with the request though (see #53 and https://bugzilla.mozilla.org/show_bug.cgi?id=1165237). This could be used until the gap of the missing `.abort()` method is filled.

I'd put the `abort()` method on a controller that is passed to the `fetch` method (e.g. as a part of Request or RequestInit). If re-use of these parameters is desired (https://github.com/whatwg/fetch/issues/20#issuecomment-74236024), we could require the controller to be used only once, for one fetch call.

---
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/27#issuecomment-102342814

Received on Friday, 15 May 2015 09:31:27 UTC