-
-
Notifications
You must be signed in to change notification settings - Fork 35.4k
http: Using URL with http.request (feature suggestion) #20795
Copy link
Copy link
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.whatwg-urlIssues and PRs related to the WHATWG URL implementation.Issues and PRs related to the WHATWG URL implementation.
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.httpIssues or PRs related to the http subsystem.Issues or PRs related to the http subsystem.whatwg-urlIssues and PRs related to the WHATWG URL implementation.Issues and PRs related to the WHATWG URL implementation.
Using
URLobjects is clearly the way to go when it comes to dealing with URLs, andhttp.request()can take aURLobject 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 calledurlthat 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.