class Deno.HttpClient
implements Disposable
A custom HttpClient
for use with fetch
function. This is
designed to allow custom certificates or proxies to be used with fetch()
.
Examples Jump to heading
Jump to heading
Example 1
Example 1
const caCert = await Deno.readTextFile("./ca.pem");
const client = Deno.createHttpClient({ caCerts: [ caCert ] });
const req = await fetch("https://myserver.com", { client });
Methods Jump to heading
Jump to heading[Symbol.dispose](): void
Jump to headingclose(): void
Close the HTTP client.