summaryrefslogtreecommitdiff
path: root/ext/http/lib.rs
diff options
context:
space:
mode:
authorDivy Srivastava <dj.srivastava23@gmail.com>2024-11-08 18:46:11 +0530
committerGitHub <noreply@github.com>2024-11-08 18:46:11 +0530
commitb482a50299ae4f636a186038460e54af65e2b627 (patch)
tree0d9cb0f2348391b438efa133afd391b189ec0e30 /ext/http/lib.rs
parent637b1d5508293ed02bef2f317b30bb7c1f0cbc71 (diff)
feat(ext/http): abort event when request is cancelled (#26781)
```js Deno.serve(async (req) => { const { promise, resolve } = Promise.withResolvers<void>(); req.signal.addEventListener("abort", () => { resolve(); }); await promise; return new Response("Ok"); }); ```
Diffstat (limited to 'ext/http/lib.rs')
-rw-r--r--ext/http/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/ext/http/lib.rs b/ext/http/lib.rs
index 9d71e3ad3..49893b1b9 100644
--- a/ext/http/lib.rs
+++ b/ext/http/lib.rs
@@ -112,6 +112,7 @@ deno_core::extension!(
http_next::op_http_close_after_finish,
http_next::op_http_get_request_header,
http_next::op_http_get_request_headers,
+ http_next::op_http_request_on_cancel,
http_next::op_http_get_request_method_and_url<HTTP>,
http_next::op_http_get_request_cancelled,
http_next::op_http_read_request_body,