Skip to content

Commit

Permalink
feat: Deprecate 'Deno.serveHttp' API (#21874)
Browse files Browse the repository at this point in the history
`Deno.serveHttp` is now deprecated. 

Users should migrate to `Deno.serve` API.
  • Loading branch information
bartlomieju authored Jan 14, 2024
1 parent 0d51c1f commit a250553
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions cli/tsc/dts/lib.deno.ns.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5286,7 +5286,9 @@ declare namespace Deno {
/** The event yielded from an {@linkcode HttpConn} which represents an HTTP
* request from a remote client.
*
* @category HTTP Server */
* @category HTTP Server
* @deprecated Use {@linkcode serve} instead.
*/
export interface RequestEvent {
/** The request from the client in the form of the web platform
* {@linkcode Request}. */
Expand All @@ -5305,7 +5307,9 @@ declare namespace Deno {
* yields up {@linkcode RequestEvent} events, representing individual
* requests on the HTTP server connection.
*
* @category HTTP Server */
* @category HTTP Server
* @deprecated Use {@linkcode serve} instead.
*/
export interface HttpConn extends AsyncIterable<RequestEvent>, Disposable {
/** The resource ID associated with this connection. Generally users do not
* need to be aware of this identifier. */
Expand Down Expand Up @@ -5370,6 +5374,7 @@ declare namespace Deno {
* used elsewhere. In such a case, this function will fail.
*
* @category HTTP Server
* @deprecated Use {@linkcode serve} instead.
*/
export function serveHttp(conn: Conn): HttpConn;

Expand Down

0 comments on commit a250553

Please sign in to comment.