onResponse
vs setTimeout
for executing code after the response is sent?
#475
Unanswered
elliotwaite
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
If I want to execute some code after the response is sent, it seems like Elysia recommends using the
onResponse
life-cycle hook. However, can I also just usesetTimeout()
within a route handler to schedule some code that will run after the response is sent? Or are there any downsides to doing it this way that I should be aware of?Beta Was this translation helpful? Give feedback.
All reactions