x/oak/context.ts

A middleware framework for handling HTTP with Deno, Node, Bun and Cloudflare Workers 🐿️ 🦕
Very Popular
Latest
method Context.prototype.upgrade
import { Context } from "https://dotland-vbqsvsrpfncg.deno-staging.dev/x/oak@v17.1.3/context.ts?p=prototype.upgrade&s=Context";

Take the current request and upgrade it to a web socket, resolving with the a web standard WebSocket object. This will set .respond to false. If the socket cannot be upgraded, this method will throw.

Returns

WebSocket[src]