Skip to main content
function Deno.upgradeHttpRaw
Unstable

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.

Returns

[Deno.Conn, Uint8Array]