Open vymao opened 5 months ago
As I understand it, a better "unbuffered" mode that invokes a callback for every event received is desired here?
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.
Right now this feature is not planed, but you are more than welcome to create PR for it.
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