Skip to content

Using the Header object breaks header merging #2

Description

@sdwio

Using the header object in a fetch call

    headers: new Headers(
        {
          "Content-Type": "application/json",
         }
      ),

instead of just

    headers: {
        "Content-Type": "application/json",
       }

will cause the merging of headers as show in the documentation to fail. Only the header(s) given in the fetch call will be used.

If a fix or warning for this is not desirable, could it be at least mentioned in the documentation? Depending on which solution you prefer I will gladly create a pull request.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions