You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to use sse-starlette with datastar, which expects server sent events with fragments likefragment <div id='test'>\nUpdated\n</div>
However it looks like starlette-sse always splits the data into multiple data lines when it encounters a newline. if self.data is not None: for chunk in self.LINE_SEP_EXPR.split(str(self.data)): buffer.write(f"data: {chunk}") buffer.write(self._sep)
Unless my generator outputs bytes directly.
Is there any way to escape my newlines?
The text was updated successfully, but these errors were encountered:
I'm trying to use sse-starlette with datastar, which expects server sent events with fragments like
fragment <div id='test'>\nUpdated\n</div>
However it looks like starlette-sse always splits the data into multiple data lines when it encounters a newline.
if self.data is not None: for chunk in self.LINE_SEP_EXPR.split(str(self.data)): buffer.write(f"data: {chunk}") buffer.write(self._sep)
Unless my generator outputs bytes directly.
Is there any way to escape my newlines?
The text was updated successfully, but these errors were encountered: