reqwasm
reqwasm copied to clipboard
interest in support for EventSource?
Is there any interest in expanding this crate also to wrap web_sys::EventSource
? I would imagine taking strong inspiration from how web_sys::WebSocket
is wrapped. I am thinking about a future for what was previously done by yew-event-source
in yew 0.19 and it seems this crate would be a natural home.
Sounds something nice to have. I've never worked with SSE so I can't really say much about it. If an API for that were to exist, it would be something like the WebSocket
one. I'm not fully sure about the error handling aspect of WebSocket
API which is something I would like to address first
OK, thanks. I may have a go at implementation but understand the error handling may need to be reworked. I think of SSEs more-or-less like uni-directional text-only websockets (from server to client only with no binary data). The advantage of this is that any streaming HTTP client can stream data from the server without requiring additional websocket support. SSEs should also be directly compatible with HTTP/2 and HTTP/3 with no further ado.
Thanks again for the feedback. At the moment I've gotten a little example working without reqwasm but rather just using using plain web-sys
. I am going to go with that approach for a while and for myself will de-prioritize the idea adding EventSource support to reqwasm. You may close the issue if you like.
I will leave the issue open. SSE is something that should be supported.