Skip to content

Using the Header object breaks header merging #2

@sdwio

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions