diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2024-01-22 22:35:39 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-22 21:35:39 +0000 |
commit | 71551c80a1c7ea2cc75cf82c5871212559709789 (patch) | |
tree | 6d5e458e54ea6598d78d6b4d7177006a9048deb6 /cli/tsc | |
parent | 69d5f136badfd7cfa9b979ff2fee7caf397098ca (diff) |
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.
Diffstat (limited to 'cli/tsc')
-rw-r--r-- | cli/tsc/99_main_compiler.js | 1 | ||||
-rw-r--r-- | cli/tsc/dts/lib.deno.unstable.d.ts | 28 |
2 files changed, 0 insertions, 29 deletions
diff --git a/cli/tsc/99_main_compiler.js b/cli/tsc/99_main_compiler.js index 0cb917f96..32c3bf035 100644 --- a/cli/tsc/99_main_compiler.js +++ b/cli/tsc/99_main_compiler.js @@ -53,7 +53,6 @@ delete Object.prototype.__proto__; "listen", "listenDatagram", "openKv", - "upgradeHttp", "umask", ]); const unstableMsgSuggestion = 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 @@ -1189,34 +1189,6 @@ declare namespace 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. - * {@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. * * When a path is provided, the database will be persisted to disk at that |