summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/https.ts
diff options
context:
space:
mode:
authorLeo Kettmeir <crowlkats@toaxl.com>2023-05-23 03:03:10 +0200
committerGitHub <noreply@github.com>2023-05-23 03:03:10 +0200
commit58782589528dc442e2a1fdf6d98454cbf01ac2ad (patch)
tree69137cf6a5fe7daa3c2f7ab34060069edab7c35a /ext/node/polyfills/https.ts
parent25232fa4e8ba2e9601699cff0cc9a6e6f03171ee (diff)
refactor: further work on node http client (#19211)
Diffstat (limited to 'ext/node/polyfills/https.ts')
-rw-r--r--ext/node/polyfills/https.ts10
1 files changed, 3 insertions, 7 deletions
diff --git a/ext/node/polyfills/https.ts b/ext/node/polyfills/https.ts
index 9261e8c2f..dfd8f24d9 100644
--- a/ext/node/polyfills/https.ts
+++ b/ext/node/polyfills/https.ts
@@ -9,6 +9,7 @@ import {
type RequestOptions,
} from "ext:deno_node/http.ts";
import { Agent as HttpAgent } from "ext:deno_node/_http_agent.mjs";
+import { createHttpClient } from "ext:deno_fetch/22_http_client.js";
export class Server {
constructor() {
@@ -80,7 +81,7 @@ class HttpsClientRequest extends ClientRequest {
return undefined;
}
if (caCerts !== undefined) {
- return Deno.createHttpClient({ caCerts });
+ return createHttpClient({ caCerts, http2: false });
}
// const status = await Deno.permissions.query({
// name: "env",
@@ -97,13 +98,8 @@ class HttpsClientRequest extends ClientRequest {
}
const caCert = Deno.readTextFileSync(certFilename);
caCerts = [caCert];
- return Deno.createHttpClient({ caCerts });
+ return createHttpClient({ caCerts, http2: false });
}
-
- /*override _createSocket(): Socket {
- // deno-lint-ignore no-explicit-any
- return { authorized: true } as any;
- }*/
}
/** Makes a request to an https server. */