{"action":"created","issue":{"url":"https://api.github.com/repos/request/request/issues/1982","labels_url":"https://api.github.com/repos/request/request/issues/1982/labels{/name}","comments_url":"https://api.github.com/repos/request/request/issues/1982/comments","events_url":"https://api.github.com/repos/request/request/issues/1982/events","html_url":"https://github.com/request/request/issues/1982","id":123858340,"number":1982,"title":"Request Next","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":"open","locked":false,"assignee":null,"milestone":null,"comments":25,"created_at":"2015-12-25T06:43:37Z","updated_at":"2015-12-30T19:11:37Z","closed_at":null,"body":"![dayum](https://cloud.githubusercontent.com/assets/1694112/12000504/b1fb1c32-aae0-11e5-80fe-87dd05188fcc.gif)\r\n\r\n### :christmas_tree: :sparkles: [IT IS HAPPENING](https://gist.github.com/simov/552bee6ce6001205393e) :gift: :tada: \r\n"},"comment":{"url":"https://api.github.com/repos/request/request/issues/comments/168057917","html_url":"https://github.com/request/request/issues/1982#issuecomment-168057917","issue_url":"https://api.github.com/repos/request/request/issues/1982","id":168057917,"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-12-30T19:11:37Z","updated_at":"2015-12-30T19:11:37Z","body":"@ahmadnassri [your implementation](https://github.com/request/legacy/blob/master/lib/har.js) is almost unchanged, I just removed the switch statements (because styles) and also there was an issue with detecting some of the content-types (not strictly matching), but that was fixed here as well.\r\n\r\nThe har module itself is called inside the [options](https://github.com/request/legacy/blob/master/lib/options.js#L126-L128) module right before setting up any other option. This module is a proxy for the options that request accepts, and the defaults it expects, to options that the core understands.\r\n\r\nOne of my main goals was to keep the core as small as possible and the har option felt like it can live outside of it without a problem (but that may change of course).\r\n\r\nSo if you take a look at the [@request/client](https://github.com/request/client) for example, an HTTP client that supports the har option might look like this:\r\n\r\n```js\r\nvar request = require('@request/core') // or @request/client or any other compatible client\r\nvar har = require('@request/har')\r\n\r\n\r\nfunction client (options) {\r\n  if (options.har) {\r\n    har(options)\r\n  }\r\n  return request(options)\r\n}\r\n\r\nmodule.exports = client\r\n```\r\n\r\nThat way you can have a client that supports har without the need to use the legacy module, which is kind of a mess of course :)\r\n\r\nSo it seems that I just have to create a separate har repo and publish it on npm as well. Let me know if the above scenario suits you."}}