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

So, what's the status on this? What remaining concerns are blocking this from being specced? Why not have `fetch()` return an object with:

- `then(cb)`, which takes a resolution handler and returns a CancelablePromise
- `catch(cb)`, which takes a rejection handler and returns a CancelablePromise
- `abort()`, which sends rejection to descendent promises the same way an error in the request would
- `cancel()`, which registers a disinterest in the results of the fetch, which will cause the fetch to be silently aborted if all CancelablePromises following from the fetch call `cancel()`
- `addEventListener('progress',cb)` (and the corresponding `removeEventListener`), for managing progress event listeners which receive ProgressEvents

Where CancelablePromise has:

- `then(cb)`, which takes a resolution handler and returns a Promise
- `catch(cb)`, which takes a rejection handler and returns a Promise
- `cancel()`, which registers a disinterest in the results of the fetch, which will cause the fetch to be silently aborted if all other CancelablePromises following from the parent fetch call `cancel()`

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

Received on Sunday, 24 January 2016 02:30:39 UTC