Deno.upgradeHttpRaw

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. WebSockets).

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.

function upgradeHttpRaw(request: Request): [Deno.Conn, Uint8Array];
§
upgradeHttpRaw(request: Request): [Deno.Conn, Uint8Array]
[src]

§Parameters

§
request: Request
[src]

§Return Type

§
[Deno.Conn, Uint8Array]
[src]