import { Deno } from "https://deno.land/x/deno@v1.32.3/cli/tsc/dts/lib.deno.unstable.d.ts";
const { upgradeHttpRaw } = Deno;
UNSTABLE: New API, yet to be vetted.
Allows "hijacking" the connection that the request is associated with.
This can be used to implement protocols that build on top of HTTP (eg.
WebSocket
).
Unlike Deno.upgradeHttp
this function does not require that you
respond to the request with a Response
object. Instead this
function returns the underlying connection and first packet received
immediately, and then the caller is responsible for writing the response to
the connection.
This method can only be called on requests originating the
Deno.serve
server.
Parameters
request: Request