Support for string as request parameter #17

Open
twolfson opened this Issue Apr 25, 2013 · 1 comment

Projects

None yet

2 participants

@twolfson

node@0.10 supports using a string as the request parameter. If it is one, it converts it into an object via url.parse.

http.request.get('http://github.com/');

// equivalent to
http.request.get({
  hostname: 'github.com'
});

https://github.com/joyent/node/blob/85e4fc4306055656f0acab0052ae6da73bfbeb1f/lib/http.js#L53-L55

I was wondering if the lack of support for this in http-browserify was intentional or not (it left me scratching my head for a bit until I saw the cause). If it was unintentional, I would be more than happy to make a PR for this.

@jieter

+1.

Or at least a remark in the README...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment