kameleoon-reqwest-eventsource 0.6.2

Kameleoon-maintained fork of reqwest-eventsource
Documentation

kameleoon-reqwest-eventsource

This crate is a Kameleoon-maintained fork of reqwest-eventsource.

Original project copyright belongs to the original reqwest-eventsource contributors. Kameleoon modifications are copyright 2026 Kameleoon.

The Rust crate name remains reqwest_eventsource, so downstream imports are compatible with the original crate.

Provides a simple wrapper for [reqwest] to provide an Event Source implementation. You can learn more about Server Sent Events (SSE) take a look at the MDN docs This crate uses [eventsource_stream] to wrap the underlying Bytes stream, and retries failed requests.

Example

let mut es = EventSource::get("http://localhost:8000/events");
while let Some(event) = es.next().await {
    match event {
        Ok(Event::Open) => println!("Connection Open!"),
        Ok(Event::Message(message)) => println!("Message: {:#?}", message),
        Err(err) => {
            println!("Error: {}", err);
            es.close();
        }
    }
}

License: MIT OR Apache-2.0