{"action":"created","issue":{"url":"https://api.github.com/repos/nodejs/node/issues/9069","repository_url":"https://api.github.com/repos/nodejs/node","labels_url":"https://api.github.com/repos/nodejs/node/issues/9069/labels{/name}","comments_url":"https://api.github.com/repos/nodejs/node/issues/9069/comments","events_url":"https://api.github.com/repos/nodejs/node/issues/9069/events","html_url":"https://github.com/nodejs/node/issues/9069","id":182662909,"number":9069,"title":"http core module issue","user":{"login":"the1mills","id":2148448,"avatar_url":"https://avatars.githubusercontent.com/u/2148448?v=3","gravatar_id":"","url":"https://api.github.com/users/the1mills","html_url":"https://github.com/the1mills","followers_url":"https://api.github.com/users/the1mills/followers","following_url":"https://api.github.com/users/the1mills/following{/other_user}","gists_url":"https://api.github.com/users/the1mills/gists{/gist_id}","starred_url":"https://api.github.com/users/the1mills/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/the1mills/subscriptions","organizations_url":"https://api.github.com/users/the1mills/orgs","repos_url":"https://api.github.com/users/the1mills/repos","events_url":"https://api.github.com/users/the1mills/events{/privacy}","received_events_url":"https://api.github.com/users/the1mills/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/nodejs/node/labels/good%20first%20contribution","name":"good first contribution","color":"bfdadc"},{"url":"https://api.github.com/repos/nodejs/node/labels/http","name":"http","color":"c7def8"},{"url":"https://api.github.com/repos/nodejs/node/labels/question","name":"question","color":"cc317c"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":12,"created_at":"2016-10-12T23:57:01Z","updated_at":"2016-10-25T18:21:32Z","closed_at":null,"body":"on Node.js 6.7\r\n\r\n\r\nI got this while using require('http').request()\r\n\r\n```\r\n[accounts.api.test.js] \tstack: TypeError: self.agent.addRequest is not a function\r\n[accounts.api.test.js]     at new ClientRequest (_http_client.js:158:16)\r\n[accounts.api.test.js]     at Object.exports.request (http.js:31:10)\r\n[accounts.api.test.js]     at Object.makeHTTPRequest [as httpHelper] (/Users/t_millal/WebstormProjects/autodesk/crucible-poc-discovery/test/helpers/http-helper.js:22:20)\r\n[accounts.api.test.js]     at TestSuiteBase.it.cb.t (/Users/t_millal/WebstormProjects/autodesk/crucible-poc-discovery/test/test-src/accounts.api.test.js:27:17)\r\n[accounts.api.test.js]     at /Users/t_millal/WebstormProjects/oresoftware/suman/lib/test-suite-helpers/handle-test.js:191:37\r\n[accounts.api.test.js]     at _combinedTickCallback (internal/process/next_tick.js:67:7)\r\n[accounts.api.test.js]     at process._tickDomainCallback (internal/process/next_tick.js:122:9)\r\n```\r\n\r\nprobably shouldn't be happening no matter what the input data is, but here it is:\r\n```\r\n\r\n[accounts.api.test.js]  => request d => \r\n[accounts.api.test.js]  { host: 'localhost',\r\n[accounts.api.test.js]   port: 3001,\r\n[accounts.api.test.js]   path: '/api/Accounts',\r\n[accounts.api.test.js]   method: 'GET',\r\n[accounts.api.test.js]   agent: true,   <<< seems to be culprit\r\n[accounts.api.test.js]   headers: { 'Content-Type': 'application/json' } }\r\n```\r\n\r\ncurious as to what might be happening thanks, setting agent to false, will prevent this error being thrown..."},"comment":{"url":"https://api.github.com/repos/nodejs/node/issues/comments/256122249","html_url":"https://github.com/nodejs/node/issues/9069#issuecomment-256122249","issue_url":"https://api.github.com/repos/nodejs/node/issues/9069","id":256122249,"user":{"login":"ORESoftware","id":11139560,"avatar_url":"https://avatars.githubusercontent.com/u/11139560?v=3","gravatar_id":"","url":"https://api.github.com/users/ORESoftware","html_url":"https://github.com/ORESoftware","followers_url":"https://api.github.com/users/ORESoftware/followers","following_url":"https://api.github.com/users/ORESoftware/following{/other_user}","gists_url":"https://api.github.com/users/ORESoftware/gists{/gist_id}","starred_url":"https://api.github.com/users/ORESoftware/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ORESoftware/subscriptions","organizations_url":"https://api.github.com/users/ORESoftware/orgs","repos_url":"https://api.github.com/users/ORESoftware/repos","events_url":"https://api.github.com/users/ORESoftware/events{/privacy}","received_events_url":"https://api.github.com/users/ORESoftware/received_events","type":"User","site_admin":false},"created_at":"2016-10-25T18:21:32Z","updated_at":"2016-10-25T18:21:32Z","body":"right I was saying agent:undefined is the same as\n!options.hasOwnProperty('agent'),\n\nshould result in same thing\n\nas for agent:true, it needs to be one of three things:\n\n~agent:false, (would not make sense at all)\n~agent:undefined,\nor some 3rd thing\n\nmy vote is that agent:true procures some default agent of some variety\nOn Oct 24, 2016 1:58 PM, \"Teddy Katz\" <notifications@github.com> wrote:\n\n> I think agent: false semantically means \"don't use an agent\". agent: true\n> semantically means \"use an agent\". Explicitly listing agent: undefined\n> does seem sort of weird, and I'm not sure what it should mean, but a more\n> common case would be omitting the agent property entirely, which triggers\n> the default behavior.\n>\n> We could use hasOwnProperty to detect whether agent: undefined is\n> explicitly passed, but I think changing the behavior based on\n> hasOwnProperty will be confusing. Similarly, I think treating null any\n> differently than undefined will be confusing.\n>\n> I don't think this API is overly confusing; if we allow agent: true, then\n> the option is basically a boolean value that defaults to true. (This\n> ignores the ability to pass a different agent instead of a boolean, but I\n> think that can be considered separately.)\n>\n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub\n> <https://github.com/nodejs/node/issues/9069#issuecomment-255863931>, or mute\n> the thread\n> <https://github.com/notifications/unsubscribe-auth/AKn56It73KYeA5X9C7iItolz3K8PQRqaks5q3RvxgaJpZM4KVWCl>\n> .\n>\n"}}
{"actor":{"display_login":"ORESoftware"}}