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

XHR is a red herring, it already exists. This is about `fetch`.

Currently `$.ajax` uses an augmented-promise approach with its `jqXHR` and it sometimes confuses people who somehow expect that the extra methods like `.abort()` survive through a promise chain. For that reason it doesn't surprise me that the Twitter-sphere misunderstands the proposal, since it's putting non-promise methods on a promise and that's not a common API design today.

I can't fathom the idea of letting aborted requests leave the promise in an eternally-pending state, or even letting that be a configurable option. It seems like the promise should consistently resolve or reject with a "programmatic abort". (jQuery rejects on abort.) The consumer getting a `fetch` promise should not have to know whether the request was originally made to be abort-able or not, although it certainly would need to handle an abort result in the general case. 

These are the kinds of added complexity I am talking about.



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

Received on Friday, 27 March 2015 03:40:28 UTC