From 71551c80a1c7ea2cc75cf82c5871212559709789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Mon, 22 Jan 2024 22:35:39 +0100 Subject: feat(unstable): remove Deno.upgradeHttp API (#21856) Closes https://github.com/denoland/deno/issues/21828. This API is a huge footgun. And given that "Deno.serveHttp" is a deprecated API that is discouraged to use (use "Deno.serve()" instead); it makes no sense to keep this API around. This is a step towards fully migrating to Hyper 1. --- cli/tsc/dts/lib.deno.unstable.d.ts | 28 ---------------------------- 1 file changed, 28 deletions(-) (limited to 'cli/tsc/dts/lib.deno.unstable.d.ts') diff --git a/cli/tsc/dts/lib.deno.unstable.d.ts b/cli/tsc/dts/lib.deno.unstable.d.ts index f0f6f4571..870cb2e1a 100644 --- a/cli/tsc/dts/lib.deno.unstable.d.ts +++ b/cli/tsc/dts/lib.deno.unstable.d.ts @@ -1187,34 +1187,6 @@ declare namespace Deno { */ export function funlockSync(rid: number): void; - /** **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. - * {@linkcode WebSocket}). - * - * The returned promise returns underlying connection and first packet - * received. The promise shouldn't be awaited before responding to the - * `request`, otherwise event loop might deadlock. - * - * ```ts - * function handler(req: Request): Response { - * Deno.upgradeHttp(req).then(([conn, firstPacket]) => { - * // ... - * }); - * return new Response(null, { status: 101 }); - * } - * ``` - * - * This method can only be called on requests originating the - * {@linkcode Deno.serveHttp} server. - * - * @category HTTP Server - */ - export function upgradeHttp( - request: Request, - ): Promise<[Deno.Conn, Uint8Array]>; - /** **UNSTABLE**: New API, yet to be vetted. * * Open a new {@linkcode Deno.Kv} connection to persist data. -- cgit v1.2.3