sseer (sse - er)
What?
A collection of utilities for getting Events out of your SSE streams
Why?
As a bit of a learning project, in making a 'real' rust crate. Also got to learn a bit about the async ecosystem and hopefully make some improvements over the original code reqwest-eventsource and eventsource-stream by Julian Popescu
How?
With reqwest:
let request = client.get;
let mut event_source = new?;
while let Some = event_source.next.await
Make an EventSource stream over your RequestBuilder and it turns into a Stream. Or if you want to handle it yourself then hit up the event_stream module for a Stream that parses bytes into Events. Or use the parser module if you want to parse it yourself.
let mut event_stream = new?;
No std?
Yes, without the reqwest feature it's all no_std.