A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://docs.deno.com/api/deno/~/Deno.createHttpClient below:

Deno.createHttpClient - Deno documentation

Create a custom HttpClient to use with fetch. This is an extension of the web platform Fetch API which allows Deno to use custom TLS CA certificates and connect via a proxy while using fetch().

The cert and key options can be used to specify a client certificate and key to use when connecting to a server that requires client authentication (mutual TLS or mTLS). The cert and key options must be provided in PEM format.

Examples # #
const caCert = await Deno.readTextFile("./ca.pem");
const client = Deno.createHttpClient({ caCerts: [ caCert ] });
const response = await fetch("https://myserver.com", { client });
#
const client = Deno.createHttpClient({
  proxy: { url: "http://myproxy.com:8080" }
});
const response = await fetch("https://myserver.com", { client });
#
const key = "----BEGIN PRIVATE KEY----...";
const cert = "----BEGIN CERTIFICATE----...";
const client = Deno.createHttpClient({ key, cert });
const response = await fetch("https://myserver.com", { client });
Parameters # Return Type #

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4