Skip to main content
Module

x/http_server/mod.ts>upgrade

🌐 Light-weight http server
Latest
function upgrade
import { upgrade } from "https://deno.land/x/http_server@v2.0.5/mod.ts";

Upgrade the request to a websocket connection.

Examples

upgrade(data);

Parameters

data: Data
  • The request data to upgrade.

Returns

WebSocket | null

A socket if the upgrade was successful, otherwise null.