{"action":"created","issue":{"url":"https://api.github.com/repos/molnarg/node-http2/issues/174","repository_url":"https://api.github.com/repos/molnarg/node-http2","labels_url":"https://api.github.com/repos/molnarg/node-http2/issues/174/labels{/name}","comments_url":"https://api.github.com/repos/molnarg/node-http2/issues/174/comments","events_url":"https://api.github.com/repos/molnarg/node-http2/issues/174/events","html_url":"https://github.com/molnarg/node-http2/issues/174","id":128911858,"number":174,"title":"http2 agent doesn't work with request module","user":{"login":"Perseid","id":82127,"avatar_url":"https://avatars.githubusercontent.com/u/82127?v=3","gravatar_id":"","url":"https://api.github.com/users/Perseid","html_url":"https://github.com/Perseid","followers_url":"https://api.github.com/users/Perseid/followers","following_url":"https://api.github.com/users/Perseid/following{/other_user}","gists_url":"https://api.github.com/users/Perseid/gists{/gist_id}","starred_url":"https://api.github.com/users/Perseid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Perseid/subscriptions","organizations_url":"https://api.github.com/users/Perseid/orgs","repos_url":"https://api.github.com/users/Perseid/repos","events_url":"https://api.github.com/users/Perseid/events{/privacy}","received_events_url":"https://api.github.com/users/Perseid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2016-01-26T19:01:37Z","updated_at":"2016-04-20T09:00:36Z","closed_at":null,"body":"Hi, \r\n\r\nI'm trying to use the http2 agent with the [request module](https://github.com/request/request).  Running \r\n\r\n    var request = require(\"request\");\r\n    var https = require(\"https\");\r\n    var myHttp1Agent = new https.Agent({ca:ca});\r\n    request({url:\"https://foo.testing/\", agent:myHttp1Agent},function(error, response, body){\r\n      console.log(\"request with http1 agent\");\r\n      console.log(error,body);\r\n    });\r\n\r\nworks fine but with the http2 version\r\n\r\n    var request = require(\"request\");\r\n    var http2 = require(\"http2\");\r\n    var myHttp2Agent = new http2.Agent({ca:ca});\r\n    request({url:\"https://foo.testing/\", agent:myHttp2Agent},function(error, response, body){\r\n      console.log(\"request with http2 agent\");\r\n      console.log(error,body);\r\n    });\r\n\r\nI get an exception:\r\n\r\n    _http_client.js:137\r\n        self.agent.addRequest(self, options);\r\n                   ^\r\n\r\n    TypeError: self.agent.addRequest is not a function\r\n        at new ClientRequest (_http_client.js:137:16)\r\n        at Object.exports.request (http.js:31:10)\r\n        at Object.exports.request (https.js:181:15)\r\n        at Request.start (/home/node/app/node_modules/request/request.js:746:30)\r\n        at Request.end (/home/node/app/node_modules/request/request.js:1357:10)\r\n        at end (/home/node/app/node_modules/request/request.js:574:14)\r\n        at Immediate._onImmediate (/home/node/app/node_modules/request/request.js:588:7)\r\n        at processImmediate [as _immediateCallback] (timers.js:383:17)\r\n\r\nAs far as I understood, http2 is supposed to be a drop in replacement for the http(s) module. So, is this a bug?"},"comment":{"url":"https://api.github.com/repos/molnarg/node-http2/issues/comments/212338279","html_url":"https://github.com/molnarg/node-http2/issues/174#issuecomment-212338279","issue_url":"https://api.github.com/repos/molnarg/node-http2/issues/174","id":212338279,"user":{"login":"danpantry","id":2939173,"avatar_url":"https://avatars.githubusercontent.com/u/2939173?v=3","gravatar_id":"","url":"https://api.github.com/users/danpantry","html_url":"https://github.com/danpantry","followers_url":"https://api.github.com/users/danpantry/followers","following_url":"https://api.github.com/users/danpantry/following{/other_user}","gists_url":"https://api.github.com/users/danpantry/gists{/gist_id}","starred_url":"https://api.github.com/users/danpantry/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/danpantry/subscriptions","organizations_url":"https://api.github.com/users/danpantry/orgs","repos_url":"https://api.github.com/users/danpantry/repos","events_url":"https://api.github.com/users/danpantry/events{/privacy}","received_events_url":"https://api.github.com/users/danpantry/received_events","type":"User","site_admin":false},"created_at":"2016-04-20T09:00:36Z","updated_at":"2016-04-20T09:00:36Z","body":"@felicienfrancois Cheers, thanks for the information."}}