- From: Domenic Denicola <notifications@github.com>
- Date: Tue, 27 Jun 2023 18:38:18 -0700
- To: whatwg/fetch <fetch@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
Received on Wednesday, 28 June 2023 01:38:24 UTC
It sounds like people want access to the response. In that case, I don't think this method is useful, as you already have access to the response before calling the method.
In other words, the difference between
```js
const res = await fetch(url);
try {
await res.throwIfNotOk();
// use res
} catch (e) {
// use e.res
}
```
and
```js
const res = await fetch(url);
if (res.ok) {
// use res
} else {
// use res
}
```
doesn't seem like a win to me.
--
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1679#issuecomment-1610473537
You are receiving this because you are subscribed to this thread.
Message ID: <whatwg/fetch/issues/1679/1610473537@github.com>
Received on Wednesday, 28 June 2023 01:38:24 UTC