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

> @wanderview The observer should reflect what actually happened, so it should never go from "aborted" to "complete", which are both end states.

I need to look at the PR you wrote this morning, but can the observer state be "completed" before the fetch() promise resolves?  If the answer is yes, then the following is true?

```
const controller = new FetchController();

fetch(url, { controller }).then(response => {
  // maybe a no-op if already in completed state
  controller.abort();
  return response.text();
}).then(text => {
  // We get here if the body is small enough that its already completed before
  // the fetch promise resolves with the Response.
});
```

-- 
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-292792141

Received on Sunday, 9 April 2017 15:18:25 UTC