This repository was archived by the owner on Apr 22, 2023. It is now read-only.

Description
url.format
will return an object owns pathname
rather than path
, however http.request
and https.request
do accept path
rather than pathname
.
sometimes, we would seem to write our program:
var urlobj = url.format('http://github.com/yorkie');
http.request(urlobj, function (res) {
// actually we get the response from http://github.com
});
path
is missing, yeah actually we can add urlobj.path = urlobj.pathname
for now, it does work as well, but it's a weird behavior in api level imo.
I'm guessing we should unify these two/three functions definitely, of course backward compatible with url
module.