{"action":"created","issue":{"url":"https://api.github.com/repos/request/request/issues/1905","labels_url":"https://api.github.com/repos/request/request/issues/1905/labels{/name}","comments_url":"https://api.github.com/repos/request/request/issues/1905/comments","events_url":"https://api.github.com/repos/request/request/issues/1905/events","html_url":"https://github.com/request/request/pull/1905","id":117166491,"number":1905,"title":"Convert typed arrays into regular buffers","user":{"login":"simov","id":1694112,"avatar_url":"https://avatars.githubusercontent.com/u/1694112?v=3","gravatar_id":"","url":"https://api.github.com/users/simov","html_url":"https://github.com/simov","followers_url":"https://api.github.com/users/simov/followers","following_url":"https://api.github.com/users/simov/following{/other_user}","gists_url":"https://api.github.com/users/simov/gists{/gist_id}","starred_url":"https://api.github.com/users/simov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/simov/subscriptions","organizations_url":"https://api.github.com/users/simov/orgs","repos_url":"https://api.github.com/users/simov/repos","events_url":"https://api.github.com/users/simov/events{/privacy}","received_events_url":"https://api.github.com/users/simov/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-16T16:44:54Z","updated_at":"2015-12-03T20:49:12Z","closed_at":"2015-11-17T15:08:04Z","pull_request":{"url":"https://api.github.com/repos/request/request/pulls/1905","html_url":"https://github.com/request/request/pull/1905","diff_url":"https://github.com/request/request/pull/1905.diff","patch_url":"https://github.com/request/request/pull/1905.patch"},"body":"Fixes #1904 \r\n\r\nThis bug was introduced in #1733 regarding this issue #1732\r\n\r\nBringing back the code that was removed in #1733. Converting to Buffer happens only when the body is a typed array. That way this won't affect the performance fix for #1732\r\n\r\nOne additional dependency was needed [is-typedarray](https://www.npmjs.com/package/is-typedarray)"},"comment":{"url":"https://api.github.com/repos/request/request/issues/comments/161780434","html_url":"https://github.com/request/request/pull/1905#issuecomment-161780434","issue_url":"https://api.github.com/repos/request/request/issues/1905","id":161780434,"user":{"login":"NNM11","id":12702095,"avatar_url":"https://avatars.githubusercontent.com/u/12702095?v=3","gravatar_id":"","url":"https://api.github.com/users/NNM11","html_url":"https://github.com/NNM11","followers_url":"https://api.github.com/users/NNM11/followers","following_url":"https://api.github.com/users/NNM11/following{/other_user}","gists_url":"https://api.github.com/users/NNM11/gists{/gist_id}","starred_url":"https://api.github.com/users/NNM11/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NNM11/subscriptions","organizations_url":"https://api.github.com/users/NNM11/orgs","repos_url":"https://api.github.com/users/NNM11/repos","events_url":"https://api.github.com/users/NNM11/events{/privacy}","received_events_url":"https://api.github.com/users/NNM11/received_events","type":"User","site_admin":false},"created_at":"2015-12-03T20:49:12Z","updated_at":"2015-12-03T20:49:12Z","body":"I just installed request v1.4.28.    It is not fixed.  I still got this error :\r\n\r\n\"http.js:852\r\n    throw new TypeError('first argument must be a string or Buffer');\r\n          ^\r\nTypeError: first argument must be a string or Buffer\r\n    at ClientRequest.OutgoingMessage.write (http.js:852:11)\r\n    at Request.write (/usr/hdc-solution/node_modules/request/request.js:1347:25)\"\r\n-----------------------------------------------\r\nwith \r\n       var indata = { 'key':'value', 'num':number'};\r\n\tvar opts = {\r\n\t\turl : endpoint,\r\n\t\tproxy : proxyUrl,\r\n\t\tmethod : \"POST\",\r\n\t\theaders : {\r\n\t\t\t'Content-Type' : 'application/json', // HDC data type specific\r\n\t\t\t'Content-Length' : Buffer.byteLength(JSON.stringify(indata))\r\n\t\t},\r\n\t\tjson : indata  \r\n\t};\r\n\r\n\r\n\r\n"}}