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

[BUN API] Unable to use fetch with UNIX Socket #13393

Open
SpeedySH opened this issue Aug 18, 2024 · 0 comments
Open

[BUN API] Unable to use fetch with UNIX Socket #13393

SpeedySH opened this issue Aug 18, 2024 · 0 comments
Labels
bug Something isn't working needs triage

Comments

@SpeedySH
Copy link

What version of Bun is running?

1.1.24

What platform is your computer?

Linux 5.15.0-117-generic x86_64 x86_64

What steps can reproduce the bug?

  1. Create file test.ts
  2. Write next code in file:
const response = await fetch('http://api/containers/json', {
  unix: "/var/run/docker.sock",
});

const data = await response.json();
console.log(data);
  1. Execute bun test.ts
  2. Get an error:
    FailedToOpenSocket: Was there a typo in the url or port? path: "http://api/containers/json"

Reference: https://bun.sh/docs/api/fetch#unix-domain-sockets

What is the expected behavior?

Response from socket

What do you see instead?

FailedToOpenSocket: Was there a typo in the url or port? path: "http://api/containers/json"

Additional information

No response

@SpeedySH SpeedySH added bug Something isn't working needs triage labels Aug 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs triage
Projects
None yet
Development

No branches or pull requests

1 participant