{"action":"created","issue":{"url":"https://api.github.com/repos/request/request/issues/1479","labels_url":"https://api.github.com/repos/request/request/issues/1479/labels{/name}","comments_url":"https://api.github.com/repos/request/request/issues/1479/comments","events_url":"https://api.github.com/repos/request/request/issues/1479/events","html_url":"https://github.com/request/request/issues/1479","id":61183681,"number":1479,"title":"encoding: null is a hard-to-find trick when response body is not utf-8","user":{"login":"kapouer","id":131406,"avatar_url":"https://avatars.githubusercontent.com/u/131406?v=3","gravatar_id":"","url":"https://api.github.com/users/kapouer","html_url":"https://github.com/kapouer","followers_url":"https://api.github.com/users/kapouer/followers","following_url":"https://api.github.com/users/kapouer/following{/other_user}","gists_url":"https://api.github.com/users/kapouer/gists{/gist_id}","starred_url":"https://api.github.com/users/kapouer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kapouer/subscriptions","organizations_url":"https://api.github.com/users/kapouer/orgs","repos_url":"https://api.github.com/users/kapouer/repos","events_url":"https://api.github.com/users/kapouer/events{/privacy}","received_events_url":"https://api.github.com/users/kapouer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-03-13T18:52:15Z","updated_at":"2015-03-13T19:20:24Z","closed_at":null,"body":"Hi,\r\ni am requesting some xml file encoded in iso-8859-1 and have to go through this\r\n```\r\nvar icon = require('iconv-lite');\r\nrequest({url: myurl, encoding: null}, function(err, res, body) {\r\n  var str = iconv.decode(body.toString('binary'), 'Latin1');\r\n  // do stuff with utf-8 string\r\n});\r\n```\r\nto convert it to utf-8.\r\nThe `encoding: null` thing is particularly tricky !\r\nDon't you think request API should be more explicit ?\r\n"},"comment":{"url":"https://api.github.com/repos/request/request/issues/comments/79274346","html_url":"https://github.com/request/request/issues/1479#issuecomment-79274346","issue_url":"https://api.github.com/repos/request/request/issues/1479","id":79274346,"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},"created_at":"2015-03-13T19:20:24Z","updated_at":"2015-03-13T19:20:24Z","body":"Definitely, it's not user friendly IMO. Any suggestions on improving it are greatly appreciated."}}