Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/deno/cli/dts/lib.deno.unstable.d.ts>Deno.connectTls

A modern runtime for JavaScript and TypeScript.
Go to Latest
function Deno.connectTls
allow-net
import { Deno } from "https://deno.land/x/deno@v1.28.1/cli/dts/lib.deno.unstable.d.ts";
const { connectTls } = Deno;

UNSTABLE: New API, yet to be vetted.

Create a TLS connection with an attached client certificate.

const conn = await Deno.connectTls({
  hostname: "deno.land",
  port: 443,
  certChain: "---- BEGIN CERTIFICATE ----\n ...",
  privateKey: "---- BEGIN PRIVATE KEY ----\n ...",
});

Requires allow-net permission.