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

I think you keep misunderstanding my proposal and code. `isCancelled` in your example makes no sense, it's exposing the ability to `reject` instead which is against Promise principle.

You don't want to expose the ability to resolve or reject, however, you might want expose the ability to cancel **on;y if you provide a way to do so**

rejecting inside a cancel makes no sense to me, if it's canceled, **it's canceled** meaning, indeed, not resolved, neither rejected.

Using your snippet you'll end up handling the error per each new autocomplete request. You don't want to do that, you want that nothing happens, you cancel, and you assign a new fetch.

My code provides such ability internally creating a cancel state.

Jake idea was that if silently resolved with undefined, maybe we could actually pass instead a value so that you can `f.cancel({})` so that the following then will receive an empty object (simulating in this case an empty JSON response) avoiding any sort of surprise.


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

Received on Monday, 30 March 2015 13:58:39 UTC