httpp/sse
Types
pub type SSEEvent {
Event(event_type: Option(String), data: String)
Closed
}
Constructors
-
Event(event_type: Option(String), data: String)
-
Closed
pub type SSEManagerMessage {
Shutdown
}
Constructors
-
Shutdown
Functions
pub fn event_source(
req: Request(BytesBuilder),
subject: Subject(SSEEvent),
) -> Result(Subject(SSEManagerMessage), StartError)
Send a request to a server-sent events endpoint, and receive events back on a subject you provide