Repository navigation
How to end the response immediately ? #46
Replies: 4 comments
|
Please provide more details about your use case and workflow. |
0 replies
|
I’ve set up a telegram webhook. Whenever telegram sends an update to my server, i want to immediately return a 200 response regardless of what happens, I don't want to telegram wait for my response, like below: public function index(Request $request): void
{
$telegramUpdate = $request->getBody()->getContents();
//flush and send OK response here (close connection), but continue script:
$other = new OtherStuff();
...
}i also sent some issue here |
0 replies
|
Use deferred callbacks to run work after sending the response. See the documentation. |
0 replies
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.
Uh oh!
There was an error while loading. Please reload this page.
I used to use
\Swoole\Http\Response::end()method to flush the response to the client and continue the execution, How can do the same in the hypervel?All reactions