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

Handling SSE #1014

Open
vymao opened this issue Jan 14, 2024 · 3 comments
Open

Handling SSE #1014

vymao opened this issue Jan 14, 2024 · 3 comments

Comments

@vymao
Copy link

vymao commented Jan 14, 2024

Is your feature request related to a problem?

Would be great if CPR could handle server sent events for streamed data. Currently I don't see mention of this in the documentation, and I'm trying to work around it by making WriteCallbacks, but this isn't optimal.

Possible Solution

A callback that instead could take in server sent events with error handling, instead of us having to parse it out manually and do a lot of string formatting with WriteCallbacks.

Alternatives

No response

Additional Context

No response

@COM8
Copy link
Member

COM8 commented Jan 15, 2024

As I understand it, a better "unbuffered" mode that invokes a callback for every event received is desired here?

@vymao
Copy link
Author

vymao commented Jan 15, 2024

Essentially yes, since right now, WriteCallbacks receive data in the form of a string, which isn't ideal to format if we are expecting JSON payloads.

@COM8
Copy link
Member

COM8 commented Jan 20, 2024

Right now this feature is not planed, but you are more than welcome to create PR for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants