Re: [whatwg/fetch] Aborting a fetch: The Next Generation (#447)

@jakearchibald A controller that is also a promise, is magic. I think that's begging for trouble.

I can see SO filling up with questions like:
```js
const controller = fetch(url).then(response => …);
controller.abort(); // Why is abort undefined???
```

Also, we should be forward-looking and use async functions in examples IMHO. Today I write:
```js
let response = await fetch(...args);
```
Accessing the magic controller would force me to do this:
```js
let controller = fetch(...args);
let response = await controller;
```
Which again is easy to get wrong:
```js
let controller = await fetch(...args);
let response = await controller;
controller.abort(); // Why is abort undefined???
```
To `await` or not to `await`? Considering `fetch` is an asynchronous function, and a controller is a promise, I wouldn't blame anyone for getting it wrong.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/447#issuecomment-270706103

Received on Thursday, 5 January 2017 17:38:14 UTC