Re: [whatwg/fetch] 204 and json (#113)

> ```js
> async function getJSON(response) {
>   if (response.status === 204) return '';
>   return response.json();
> }
> ```

I would go with this approach. But if it's something that needs to be done always, it could just be integrated in the call to `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/113#issuecomment-721053697

Received on Tuesday, 3 November 2020 11:14:46 UTC