Skip to content

requestInit.headers do not work #569

Open
@liheng314

Description

@liheng314

Describe the bug
requestInit.headers do not work because requestInit.headers cannot be spread (...) when its type is Headers.
code like below may be fixed.

return new Headers(
      { ...headers, ...this._requestInit?.headers }
    );

To Reproduce
Steps to reproduce the behavior:

const headers = new Headers({ "Content-Type": "application/json" });
console.log({ ...headers });
// output is {}

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions