Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Improve ease of use for url.format, url.parse and http.request APIs #9117

Closed
misterdjules opened this issue Jan 29, 2015 · 1 comment
Closed

Comments

@misterdjules
Copy link

Currently, http.request uses the path property of the options object. url.parse returns objects with a path property, so http.request and url.parse work well together. However, url.format doesn't use the path property of its input object.

This leads to confusion from users like #8722. An attempt at fixing this was made with d312b6d, but it broke some existing code that should work intuitively.

Another PR tried to fix the breaking change while still making url.format handle the path property, but it was decided that it was still making the url.format API confusing and hard to use properly.

url.format and http.request should interpret url objects the same way. Users should also still have the ability to change the parsed url objects and have http.request and url.format behave intuitively.

@misterdjules misterdjules added this to the v0.13 milestone Jan 29, 2015
@misterdjules
Copy link
Author

@tjfontaine @cjihrig @trevnorris @chrisdickinson This is my attempt at summarizing our recent discussions around this. Please, feel free to make comments and suggestions. Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants