[whatwg/fetch] `Response.error` / `Response.redirect` should return object whose headers are mutable, as well as `Response.json` (Issue #1868)

petamoriken created an issue (whatwg/fetch#1868)

### What is the issue with the Fetch Standard?

`Response.json` returns an object whose headers are *mutable*, but `Response.error`/ `Response.redirect` currently return *immutable* ones. This is inconsistent; all should be mutable.

> The static `json(data, init)` method steps are:
>
> 3. Let `responseObject` be the result of creating a `Response` object, given a new response, **"response"**, and the current realm.

https://fetch.spec.whatwg.org/#dom-response-json

> The static `error()` method steps are to return the result of creating a `Response` object, given a new network error, **"immutable"**, and the current realm.

https://fetch.spec.whatwg.org/#dom-response-error

> The static `redirect(url, status)` method steps are:
>
> 4. Let `responseObject` be the result of creating a `Response` object, given a new response, **"immutable"**, and the current realm.

https://fetch.spec.whatwg.org/#dom-response-redirect

-- 
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/fetch/issues/1868
You are receiving this because you are subscribed to this thread.

Message ID: <whatwg/fetch/issues/1868@github.com>

Received on Saturday, 18 October 2025 13:39:04 UTC