[whatwg/fetch] Should using .json on a response with 204 yield {}? (#453)

So, on a 204, if you use `.json` on the response, it will throw an error:

```
export async function deleteUser(id: string) {
  const response = await fetch('/users', { method: 'DELETE' });
  console.log(response.status) // 204
  return response.json();  // shouldn't it return {}?
}
```

Instead, it says it can't parse the json.

-- 
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/453

Received on Friday, 13 January 2017 14:45:51 UTC