{"action":"closed","issue":{"url":"https://api.github.com/repos/axios/axios/issues/975","repository_url":"https://api.github.com/repos/axios/axios","labels_url":"https://api.github.com/repos/axios/axios/issues/975/labels{/name}","comments_url":"https://api.github.com/repos/axios/axios/issues/975/comments","events_url":"https://api.github.com/repos/axios/axios/issues/975/events","html_url":"https://github.com/axios/axios/issues/975","id":238450774,"number":975,"title":"Support unix domain socket","user":{"login":"Dreamacro","id":8615343,"avatar_url":"https://avatars1.githubusercontent.com/u/8615343?v=4","gravatar_id":"","url":"https://api.github.com/users/Dreamacro","html_url":"https://github.com/Dreamacro","followers_url":"https://api.github.com/users/Dreamacro/followers","following_url":"https://api.github.com/users/Dreamacro/following{/other_user}","gists_url":"https://api.github.com/users/Dreamacro/gists{/gist_id}","starred_url":"https://api.github.com/users/Dreamacro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Dreamacro/subscriptions","organizations_url":"https://api.github.com/users/Dreamacro/orgs","repos_url":"https://api.github.com/users/Dreamacro/repos","events_url":"https://api.github.com/users/Dreamacro/events{/privacy}","received_events_url":"https://api.github.com/users/Dreamacro/received_events","type":"User","site_admin":false},"labels":[{"id":122804242,"url":"https://api.github.com/repos/axios/axios/labels/feature","name":"feature","color":"fbca04","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-06-26T06:21:50Z","updated_at":"2018-02-17T00:05:49Z","closed_at":"2018-02-17T00:05:49Z","author_association":"NONE","body":"In `adapters/http.js`, it request use `https` or `http` module with `options`.\r\n\r\n```javascript\r\nvar options = {\r\n  hostname: parsed.hostname,\r\n  port: parsed.port,\r\n  path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\\?/, ''),\r\n  method: config.method,\r\n  headers: headers,\r\n  agent: agent,\r\n  auth: auth\r\n};\r\n``` \r\nWe can add a key to support unix domain socket\r\n\r\n```javascript\r\nvar options = {\r\n  hostname: parsed.hostname,\r\n  port: parsed.port,\r\n  path: buildURL(parsed.path, config.params, config.paramsSerializer).replace(/^\\?/, ''),\r\n  socketPath: config.socketPath,  // just for test\r\n  method: config.method,\r\n  headers: headers,\r\n  agent: agent,\r\n  auth: auth\r\n};\r\n```\r\n\r\nusing axios like\r\n\r\n```javascript\r\naxios({\r\n  socketPath: '/var/run/docker.sock',\r\n  url: '/images/json'\r\n})\r\n.then(resp => console.log(resp.data))\r\n```\r\n\r\nI don't know if it fits your design concept, so I mentioned this issue\r\n"}}
{"actor":{"display_login":"emilyemorehouse"}}