{"action":"created","issue":{"url":"https://api.github.com/repos/sindresorhus/got/issues/96","labels_url":"https://api.github.com/repos/sindresorhus/got/issues/96/labels{/name}","comments_url":"https://api.github.com/repos/sindresorhus/got/issues/96/comments","events_url":"https://api.github.com/repos/sindresorhus/got/issues/96/events","html_url":"https://github.com/sindresorhus/got/pull/96","id":105025028,"number":96,"title":"Request via unix domain socket","user":{"login":"vdemedes","id":697676,"avatar_url":"https://avatars.githubusercontent.com/u/697676?v=3","gravatar_id":"","url":"https://api.github.com/users/vdemedes","html_url":"https://github.com/vdemedes","followers_url":"https://api.github.com/users/vdemedes/followers","following_url":"https://api.github.com/users/vdemedes/following{/other_user}","gists_url":"https://api.github.com/users/vdemedes/gists{/gist_id}","starred_url":"https://api.github.com/users/vdemedes/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vdemedes/subscriptions","organizations_url":"https://api.github.com/users/vdemedes/orgs","repos_url":"https://api.github.com/users/vdemedes/repos","events_url":"https://api.github.com/users/vdemedes/events{/privacy}","received_events_url":"https://api.github.com/users/vdemedes/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-09-05T12:46:21Z","updated_at":"2015-09-06T11:42:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/sindresorhus/got/pulls/96","html_url":"https://github.com/sindresorhus/got/pull/96","diff_url":"https://github.com/sindresorhus/got/pull/96.diff","patch_url":"https://github.com/sindresorhus/got/pull/96.patch"},"body":"This PR adds an ability to send http(s) requests via unix domain socket.\r\n\r\n### Known use-cases:\r\n\r\n- Docker\r\n- fleet\r\n\r\n\r\n### Usage\r\n\r\nTo send a request via unix domain socket, use the following URL scheme (borrowed from [request](https://www.npmjs.com/package/request#unix-domain-sockets) module): `protocol://unix:/path/to/socket:/request/path`, where:\r\n\r\n- `protocol` - one of: `http`, `https`\r\n- `/path/to/socket` - an absolute path to a unix socket\r\n- `/request/path` - http request path\r\n\r\n```js\r\nvar got = require('got');\r\n\r\ngot('http://unix:/var/run/docker.sock:/');\r\n```\r\n\r\nAll the existing functionality is preserved.\r\n\r\n\r\n### Tests\r\n\r\nTests for this PR are in `test/test-unix-socket.js`.\r\n\r\nLet me know what you think ;)"},"comment":{"url":"https://api.github.com/repos/sindresorhus/got/issues/comments/138075106","html_url":"https://github.com/sindresorhus/got/pull/96#issuecomment-138075106","issue_url":"https://api.github.com/repos/sindresorhus/got/issues/96","id":138075106,"user":{"login":"sindresorhus","id":170270,"avatar_url":"https://avatars.githubusercontent.com/u/170270?v=3","gravatar_id":"","url":"https://api.github.com/users/sindresorhus","html_url":"https://github.com/sindresorhus","followers_url":"https://api.github.com/users/sindresorhus/followers","following_url":"https://api.github.com/users/sindresorhus/following{/other_user}","gists_url":"https://api.github.com/users/sindresorhus/gists{/gist_id}","starred_url":"https://api.github.com/users/sindresorhus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sindresorhus/subscriptions","organizations_url":"https://api.github.com/users/sindresorhus/orgs","repos_url":"https://api.github.com/users/sindresorhus/repos","events_url":"https://api.github.com/users/sindresorhus/events{/privacy}","received_events_url":"https://api.github.com/users/sindresorhus/received_events","type":"User","site_admin":false},"created_at":"2015-09-06T11:42:02Z","updated_at":"2015-09-06T11:42:02Z","body":":+1: \r\n\r\n@vdemedes Can you add some docs? Similar to https://github.com/request/request#unix-domain-sockets Preferably with real use-cases.\r\n\r\n@floatdrop What do you think?"}}