Skip to content

Response.redirect should return object whose headers are mutable, as well as Response.json #1868

@petamoriken

Description

@petamoriken

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:

  1. 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 redirect(url, status) method steps are:

  1. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions