Skip to content

feat(ext/fetch): support localAddress option in custom HTTP client #28781

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

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

littledivy
Copy link
Member

@littledivy littledivy commented Apr 7, 2025

Fixes #27376
Fixes #23373

Example usage:

const client = Deno.createHttpClient({
  localAddress: "127.0.0.2",
});
const response = await fetch("http://localhost:4545/local_addr", {
  client,
});

@@ -1228,6 +1228,21 @@ Deno.test(
},
);

Deno.test(
{ permissions: { net: true }, ignore: Deno.build.os !== "linux" },
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only works on linux?

Copy link
Member

@ry ry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - probably this should wait for 2.3

@littledivy littledivy added this to the 2.3.0 milestone Apr 8, 2025
@sergeysolovev
Copy link

amazing!

@mastrayer
Copy link

please release it as soon as possible 😭😭

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants