Skip to content

http: Using URL with http.request (feature suggestion) #20795

Closed
@ronkorving

Description

@ronkorving
  • Version: v10.1.0
  • Platform: all
  • Subsystem: http

Using URL objects is clearly the way to go when it comes to dealing with URLs, and http.request() can take a URL object as input. This is great. But if I want to also send custom headers, I'm stuck. I would like to suggest an option for the options object called url that can be set to URL object and maybe even a string. I don't really want to make an already complex API more complex, but I'm not sure how else we can make it easier to use URL objects with HTTP requests.

Feedback, suggestions, thoughts from @nodejs/collaborators very welcome.

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestIssues that request new features to be added to Node.js.httpIssues or PRs related to the http subsystem.whatwg-urlIssues and PRs related to the WHATWG URL implementation.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions