summaryrefslogtreecommitdiff
path: root/tests/specs/run/045_proxy/programmatic_proxy_client.ts
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2024-05-14 12:47:57 -0400
committerGitHub <noreply@github.com>2024-05-14 16:47:57 +0000
commit432792a46c71b402408e1bed0affdb1c3a90d8c6 (patch)
tree22d5f90349acc8388a28351bd95ddc5f9e952c88 /tests/specs/run/045_proxy/programmatic_proxy_client.ts
parentc6189e2070ac31006920e210e616c0d9dd159b7c (diff)
chore: 045_proxy output stdout & stderr on failure (#23810)
Part of https://github.com/denoland/deno/issues/23624
Diffstat (limited to 'tests/specs/run/045_proxy/programmatic_proxy_client.ts')
-rw-r--r--tests/specs/run/045_proxy/programmatic_proxy_client.ts16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/specs/run/045_proxy/programmatic_proxy_client.ts b/tests/specs/run/045_proxy/programmatic_proxy_client.ts
new file mode 100644
index 000000000..73af590c7
--- /dev/null
+++ b/tests/specs/run/045_proxy/programmatic_proxy_client.ts
@@ -0,0 +1,16 @@
+// Copyright 2018-2024 the Deno authors. All rights reserved. MIT license.
+
+const client = Deno.createHttpClient({
+ proxy: {
+ url: "http://localhost:4555",
+ basicAuth: { username: "username", password: "password" },
+ },
+});
+
+const res = await fetch(
+ "http://localhost:4545/run/045_mod.ts",
+ { client },
+);
+console.log(`Response http: ${await res.text()}`);
+
+client.close();