- From: Conrad Irwin <notifications@github.com>
- Date: Sun, 12 Feb 2017 23:07:17 -0800
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Monday, 13 February 2017 07:07:49 UTC
We were trying to stub out the fetch API using XmlHttpRequest (so that we could access progress events).
We ran into a bug because some response codes are handled specially, so now we have code that looks like this:
```
if (this._xhr.status == 101 || this._xhr.status == 204 || this._xhr.status == 205 || this._xhr.status == 304) {
body = null
} else if (this._xhr.response) {
body = @_xhr.response
} ...
new Response(body, ...)
```
Is there a reason for special casing these response codes? It seems a rather nasty edge-case that everyone has to handle.
--
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/487
Received on Monday, 13 February 2017 07:07:49 UTC