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

Well, that really depends on the application and to what extent the signals from the server are significant. E.g., processing a response without `Content-Type` does not seem desirable to me. Browsers got in a lot of trouble doing that. Not checking the response code also seems less than optimal.

We could perhaps introduce something akin to `jsonOrUndefined` that would effectively never throw, but it would be good to see that established as a pattern in libraries with high adoption rates and even then I'd worry a bit about the brittle infrastructure it'd encourage.

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

Received on Friday, 23 August 2019 08:24:30 UTC