From 4f1b1903cfadeeba24e1b0448879fe12682effb9 Mon Sep 17 00:00:00 2001 From: Tomofumi Chiba Date: Tue, 22 Jun 2021 12:21:57 +0900 Subject: feat(fetch): add programmatic proxy (#10907) This commit adds new options to unstable "Deno.createHttpClient" API. "proxy" and "basicAuth" options were added that allow to use custom proxy when client instance is passed to "fetch" API. --- runtime/build.rs | 6 +++++- runtime/web_worker.rs | 1 + runtime/worker.rs | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) (limited to 'runtime') diff --git a/runtime/build.rs b/runtime/build.rs index 84418af4e..7d086b045 100644 --- a/runtime/build.rs +++ b/runtime/build.rs @@ -42,7 +42,11 @@ fn create_runtime_snapshot(snapshot_path: &Path, files: Vec) { deno_console::init(), deno_url::init(), deno_web::init(Default::default(), Default::default()), - deno_fetch::init::("".to_owned(), None), + deno_fetch::init::( + "".to_owned(), + None, + None, + ), deno_websocket::init::( "".to_owned(), None, diff --git a/runtime/web_worker.rs b/runtime/web_worker.rs index 84d8157d6..753238052 100644 --- a/runtime/web_worker.rs +++ b/runtime/web_worker.rs @@ -257,6 +257,7 @@ impl WebWorker { deno_fetch::init::( options.user_agent.clone(), options.ca_data.clone(), + None, ), deno_websocket::init::( options.user_agent.clone(), diff --git a/runtime/worker.rs b/runtime/worker.rs index 7bfb1506b..9dfdcc825 100644 --- a/runtime/worker.rs +++ b/runtime/worker.rs @@ -99,6 +99,7 @@ impl MainWorker { deno_fetch::init::( options.user_agent.clone(), options.ca_data.clone(), + None, ), deno_websocket::init::( options.user_agent.clone(), -- cgit v1.2.3