feat(ext/http): Implement request.signal for Deno.serve (#23425)

When the response has been successfully send, we abort the
`Request.signal` property to indicate that all resources associated with
this transaction may be torn down.
This commit is contained in:
Matt Mastracci 2024-04-24 14:03:37 -04:00 committed by GitHub
parent b60822f6e0
commit eed2598e6c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 119 additions and 34 deletions

View file

@ -10,6 +10,17 @@
declare namespace Deno {
export {}; // stop default export type behavior
/** Information for a HTTP request.
*
* @category HTTP Server
*/
export interface ServeHandlerInfo {
/** The remote address of the connection. */
remoteAddr: Deno.NetAddr;
/** The completion promise */
completed: Promise<void>;
}
/** **UNSTABLE**: New API, yet to be vetted.
*
* Retrieve the process umask. If `mask` is provided, sets the process umask.