{"issue":{"created_at":"2011-12-15T00:58:14Z","state":"open","updated_at":"2011-12-15T01:01:49Z","user":{"gravatar_id":"378a0850ffa708413ef732d43c09d39b","id":78887,"url":"https://api.github.com/users/iangreenleaf","login":"iangreenleaf","avatar_url":"https://secure.gravatar.com/avatar/378a0850ffa708413ef732d43c09d39b?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"comments":1,"body":"When constructing the options hash to pass to `http.request`:\r\n\r\n    self.host = self.uri.hostname\r\n\r\nIs there a reason to name it `host` instead of `hostname`?\r\n\r\nI ran into problems using request with [nock](https://github.com/pgte/nock), which expects the `host` value to include the port number, like `url.parse`' would do.","assignee":null,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"id":2561819,"labels":[],"number":135,"title":"host vs hostname","html_url":"https://github.com/mikeal/request/issues/135","closed_at":null,"url":"https://api.github.com/repos/mikeal/request/issues/135","milestone":null},"action":"created","comment":{"created_at":"2011-12-15T01:01:49Z","updated_at":"2011-12-15T01:01:49Z","user":{"gravatar_id":"d8eba8dd0e89a0580ec4157681121a79","id":579,"url":"https://api.github.com/users/mikeal","login":"mikeal","avatar_url":"https://secure.gravatar.com/avatar/d8eba8dd0e89a0580ec4157681121a79?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png"},"body":"sel.uri is return value from url.parse(self.url) if the url is a string.\r\n\r\nif you pass a custom object to it you'll need to replicate, exactly, the core API for require('url').parse.\r\n\r\nOn Dec 14, 2011, at December 14, 20114:58 PM, Ian Young wrote:\r\n\r\n> When constructing the options hash to pass to `http.request`:\r\n> \r\n>    self.host = self.uri.hostname\r\n> \r\n> Is there a reason to name it `host` instead of `hostname`?\r\n> \r\n> I ran into problems using request with [nock](https://github.com/pgte/nock), which expects the `host` value to include the port number, like `url.parse`' would do.\r\n> \r\n> --- \r\n> Reply to this email directly or view it on GitHub:\r\n> https://github.com/mikeal/request/issues/135","id":3155076,"url":"https://api.github.com/repos/mikeal/request/issues/comments/3155076"}}