-
Notifications
You must be signed in to change notification settings - Fork 7.3k
output of url.parse should align with http.request options #1390
Comments
So, it seems like the change would be:
Would it be easier to update the http.request to take a "url" member, which can be a string or a parsed url? Seems like something like this would be really nice: http.get(url.parse("http://user:pass@blah.com/bloo?baz"), function (res) { .. })
// or even just:
http.get("http://user:pass@blah.com/bloo?baz", function (res) { .. }) |
is the hostname to host change a breaking change? taking an url parameter starts to dip in to bike shedding and additional features. it would be convenient but would not work for proxying, which means it's only a matter of time before someone asks for proxy support :) |
Yes. |
also should be somewhat backwards compatible if possible |
If I may, I would like to work on this. I would suggest making the code switch on
Finally what would acceptance entail?
And as long as I'm in there..., but maybe these should be individual issues?
|
@seebees Yes! That'd be awesome. Please sign the CLA if you haven't already: http://nodejs.org/cla.html
Easiest way would be to add a "path" field to the url.parse output.
No. The hash is not typically sent in an HTTP request, it's client-only.
All new stuff should be in http2.js
Yep. Run
Sure. Whatever seems reasonable to make sure that the new code is being exercised.
Yeah, those are separate issues. Leave as-is for now. (Using Other stuff:
Thanks! |
not all the tests in master pass for me right now. all the HTTP ones do though. make sure you branch for this patch, then you can compare the failed tests with master to see if you broke any new ones. |
I implemented in ClientRequest so http.request collapses and I asked in #1462, but I wanted to be clear on who is making |
So how do I say this is done? Close it? I still want to make url.resolveObject work but I was unsure on how to ask to have the code reviewed... |
http2.js protocols object to store defaults for http and https, and use as a switch for supported protocols. options.hostname > options.host > 'localhost' if I have an options.auth element and I do not have an Authorization header, I do basic auth. http.request collapses to new ClientRequest since the defaults are handled by the protocol object test-http-url.parse* Fixes nodejs#1390 Conflicts: lib/http2.js
cc @mikeal @isaacs
The text was updated successfully, but these errors were encountered: