Skip to content

feat(ext/fetch): add support for fetch on unix sockets #29154

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

Merged
merged 12 commits into from
May 13, 2025

Conversation

lucacasonato
Copy link
Member

@lucacasonato lucacasonato commented May 3, 2025

This commit adds support for using Unix socket proxies in fetch API.

This is facilitated by passing an appropriate Deno.HttpClient instance
to the fetch API:

const client = Deno.createHttpClient({
  proxy: {
    transport: "unix",
    path: "/path/to/unix.sock",
  },
});

await fetch("http://localhost/ping", { client });

Closes #8821

@bartlomieju bartlomieju merged commit 3b6c70e into main May 13, 2025
18 checks passed
@bartlomieju bartlomieju deleted the unix_socket_fetcj branch May 13, 2025 16:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Using fetch for unix socket
3 participants