Skip to main content
Deno 2 is finally here ๐ŸŽ‰๏ธ
Learn more
Module

x/http_server/lib/utils/upgrade.ts>upgrade

๐ŸŒ Light-weight http server
Latest
function upgrade
import { upgrade } from "https://deno.land/x/http_server@v2.0.5/lib/utils/upgrade.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.