browserify / http-browserify

node's http module, but for the browser
MIT License
244 stars 110 forks source link

Support for string as request parameter #17

Closed twolfson closed 5 years ago

twolfson commented 11 years ago

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 commented 11 years ago

+1.

Or at least a remark in the README...

TehShrike commented 5 years ago

This issue was fixed in #34