Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSON Flush #374

Closed
userlip opened this issue Jul 8, 2018 · 4 comments
Closed

JSON Flush #374

userlip opened this issue Jul 8, 2018 · 4 comments
Labels

Comments

@userlip
Copy link

userlip commented Jul 8, 2018

Hey,

is it possible to use the Flight::json() function with flushing?

So I can call Flight::json() then the user gets a response but the script still runs after sending the data.

I tried normal flushing of content without Flight::json but that does not seem to work when using this framework 😬

@mikecao
Copy link
Collaborator

mikecao commented Jul 16, 2018

The json method will always send a response, but the script will still keep running until it calls stop. So you can just add a filter Flight::before('stop', ...) to run some code before the script exits.

@userlip
Copy link
Author

userlip commented Jul 17, 2018 via email

@mfrederico
Copy link

See: #413

It seems that you CAN accomplish non-buffering in a route

@n0nag0n
Copy link
Collaborator

n0nag0n commented Jan 3, 2024

Seems addressed

@n0nag0n n0nag0n closed this as completed Jan 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants