Skip to content

Headers polyfill is missing properties and incorrectly adds getAll #7067

@kentcdodds

Description

@kentcdodds

What version of Remix are you using?

1.19.2

Are all your remix dependencies & dev-dependencies using the same version?

  • Yes

Steps to Reproduce

const headers = new Headers()
headers.getSetCookie // not defined, should be.

The typings aren't there for it in TypeScript either. I've opened an issue about that: microsoft/TypeScript#55270 (this has been fixed)

Also, there are properties in URLSearchParams that aren't on Headers:

  • getAll
  • sort
  • size
  • toString (should just be [object Headers]

Expected Behavior

Headers should follow the standard

Actual Behavior

It is missing a property and adds some properties that aren't in the spec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingfeat:fetchIssues related to @remix-run/web-fetchfeat:typescript

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions