Skip to content

Allow passing new Headers() to res.writeHead(...) #46082

Description

@jimmywarting

What is the problem this feature will solve?

I would like for standard Headers to be passable to http response.writeHead

An example:

http.createServer((req, res) => {
  const headers = new Headers()
  res.writeHead(200, 'OK', headers)
})

What is the feature you are proposing to solve the problem?

Want things that are more web-ish

What alternatives have you considered?

No response

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

    Labels

    feature requestIssues requesting new Node.js features.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions