mirror of
https://github.com/denoland/deno.git
synced 2025-08-04 02:48:24 +00:00
feat(ext/fetch): support localAddress
option in custom HTTP client (#28781)
Fixes https://github.com/denoland/deno/issues/27376 Fixes https://github.com/denoland/deno/issues/23373 Example usage: ```js const client = Deno.createHttpClient({ localAddress: "127.0.0.2", }); const response = await fetch("http://localhost:4545/local_addr", { client, }); ```
This commit is contained in:
parent
a44ed9bbe4
commit
6f4472c5dc
7 changed files with 83 additions and 7 deletions
2
cli/tsc/dts/lib.deno.ns.d.ts
vendored
2
cli/tsc/dts/lib.deno.ns.d.ts
vendored
|
@ -6208,6 +6208,8 @@ declare namespace Deno {
|
|||
* @default {false}
|
||||
*/
|
||||
allowHost?: boolean;
|
||||
/** Sets the local address where the socket will connect from. */
|
||||
localAddress?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue