Deno.HttpClient

UNSTABLE: New API, yet to be vetted.

A custom HttpClient for use with fetch function. This is designed to allow custom certificates or proxies to be used with fetch().

@example
const caCert = await Deno.readTextFile("./ca.pem");
const client = Deno.createHttpClient({ caCerts: [ caCert ] });
const req = await fetch("https://myserver.com", { client });
interface HttpClient extends Disposable {
rid: number;
close(): void;
}

§Extends

§
Disposable
[src]

§Properties

§
rid: number
[src]

The resource ID associated with the client.

§Methods

§
close(): void
[src]

Close the HTTP client.