D
Deno
Change Theme
Search Answer Overflow
Login
Leon
Posts
Comments
D
Deno
•
Created by Leon on 4/22/2024 in
#help
How To Add .done method for new Response();
Please look at my comment a little higher - what do you think about it?
7 replies
D
Deno
•
Created by Leon on 4/22/2024 in
#help
How To Add .done method for new Response();
In new version 1.43.0 they gave me the answer: "You can use the signal like so:
Deno.
serve
((
req
)
=>
{
req.signal.
onabort
=
()
=>
console.
log
(
"done"
);
return new
Response
(
"ok"
);
});
Deno.
serve
((
req
)
=>
{
req.signal.
onabort
=
()
=>
console.
log
(
"done"
);
return new
Response
(
"ok"
);
});
It'll be triggered when the response has been fully delivered to the http layer." Is this really how it works?
7 replies