- From: AMS777 <notifications@github.com>
- Date: Tue, 03 Nov 2020 03:14:34 -0800
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Tuesday, 3 November 2020 11:14:46 UTC
> ```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