Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

got.extend doesn't support "unix:" protocol #814

Closed
2 tasks done
OmgImAlexis opened this issue May 31, 2019 · 1 comment · Fixed by #829
Closed
2 tasks done

got.extend doesn't support "unix:" protocol #814

OmgImAlexis opened this issue May 31, 2019 · 1 comment · Fixed by #829
Labels
bug Something does not work as it should ✭ help wanted ✭

Comments

@OmgImAlexis
Copy link

Describe the bug

  • Node.js version: v10.13.0
  • OS & version: Unraid 6.8.0-rc0e

Actual behavior

UnhandledPromiseRejectionWarning: UnsupportedProtocolError: Unsupported protocol "unix:"

Expected behavior

UnhandledPromiseRejectionWarning: RequestError: connect ENOENT /var/run/docker.sock

Code to reproduce

Doesn't work:

got.extend({ baseUrl: 'unix:/var/run/docker.sock' }).get('/images/json');

Works:

got('unix:/var/run/docker.sock:/images/json');

Checklist

  • I have read the documentation.
  • I have tried my code with the latest version of Node.js and Got.
@OmgImAlexis
Copy link
Author

I found a work around but this seems wrong to use.

got.extend({socketPath:'/var/run/docker.sock', protocol: 'http:'})('/images/json')

@sindresorhus sindresorhus added bug Something does not work as it should ✭ help wanted ✭ labels Jun 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something does not work as it should ✭ help wanted ✭
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants