{"action":"created","issue":{"url":"https://api.github.com/repos/joepie91/node-bhttp/issues/22","repository_url":"https://api.github.com/repos/joepie91/node-bhttp","labels_url":"https://api.github.com/repos/joepie91/node-bhttp/issues/22/labels{/name}","comments_url":"https://api.github.com/repos/joepie91/node-bhttp/issues/22/comments","events_url":"https://api.github.com/repos/joepie91/node-bhttp/issues/22/events","html_url":"https://github.com/joepie91/node-bhttp/issues/22","id":133743304,"number":22,"title":"Basic AUTH support","user":{"login":"pkoretic","id":1131063,"avatar_url":"https://avatars.githubusercontent.com/u/1131063?v=3","gravatar_id":"","url":"https://api.github.com/users/pkoretic","html_url":"https://github.com/pkoretic","followers_url":"https://api.github.com/users/pkoretic/followers","following_url":"https://api.github.com/users/pkoretic/following{/other_user}","gists_url":"https://api.github.com/users/pkoretic/gists{/gist_id}","starred_url":"https://api.github.com/users/pkoretic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pkoretic/subscriptions","organizations_url":"https://api.github.com/users/pkoretic/orgs","repos_url":"https://api.github.com/users/pkoretic/repos","events_url":"https://api.github.com/users/pkoretic/events{/privacy}","received_events_url":"https://api.github.com/users/pkoretic/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-02-15T15:39:29Z","updated_at":"2016-02-15T16:01:47Z","closed_at":null,"body":"it would be nice to have basic auth support same as `request` module\r\n\r\n```\r\nauth: { 'user': 'username', 'pass': 'password' }\r\n```\r\nmanually creating them as part of uri or header doesn't really scale well"},"comment":{"url":"https://api.github.com/repos/joepie91/node-bhttp/issues/comments/184271836","html_url":"https://github.com/joepie91/node-bhttp/issues/22#issuecomment-184271836","issue_url":"https://api.github.com/repos/joepie91/node-bhttp/issues/22","id":184271836,"user":{"login":"joepie91","id":1663259,"avatar_url":"https://avatars.githubusercontent.com/u/1663259?v=3","gravatar_id":"","url":"https://api.github.com/users/joepie91","html_url":"https://github.com/joepie91","followers_url":"https://api.github.com/users/joepie91/followers","following_url":"https://api.github.com/users/joepie91/following{/other_user}","gists_url":"https://api.github.com/users/joepie91/gists{/gist_id}","starred_url":"https://api.github.com/users/joepie91/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joepie91/subscriptions","organizations_url":"https://api.github.com/users/joepie91/orgs","repos_url":"https://api.github.com/users/joepie91/repos","events_url":"https://api.github.com/users/joepie91/events{/privacy}","received_events_url":"https://api.github.com/users/joepie91/received_events","type":"User","site_admin":false},"created_at":"2016-02-15T16:01:46Z","updated_at":"2016-02-15T16:01:46Z","body":"This can already be done using for example the [`basic-auth-header`](https://www.npmjs.com/package/basic-auth-header) module:\r\n\r\n```javascript\r\nvar bhttp = require(\"bhttp\");\r\nvar basicAuthHeader = require(\"basic-auth-header\");\r\n\r\nbhttp.get(\"http://example.com/\", {\r\n    headers: {\r\n        Authorization: basicAuthHeader(\"username\", \"password\")\r\n    }\r\n});\r\n```\r\n\r\nSince basic authentication is just a header like any other, there's not really any value in adding it to `bhttp` itself - it would increase complexity quite a bit for no real end-user gain, as it's already trivial to add a header anyway. It would also invite requests for many other authentication schemes being added, which makes the complexity issue worse.\r\n\r\nI'm not sure I see your point that it \"doesn't scale well\" - what relation is there between authentication headers and scalability?"}}