Skip to main content

property WebSocketOptions.client

unstable

An HttpClient instance to use when creating the WebSocket connection. This is useful when you need to connect through a proxy or customize TLS settings.

const client = Deno.createHttpClient({
  proxy: {
    transport: "unix",
    path: "/path/to/socket",
  },
});

const ws = new WebSocket("ws://localhost:8000/socket", { client });

Type #

Deno.HttpClient

Did you find what you needed?

Privacy policy