Skip to main content

collect_sse_events

Function collect_sse_events 

Source
pub async fn collect_sse_events<S, E>(stream: S) -> Result<Bytes, E>
where S: Stream<Item = Result<SseEvent, E>> + Send,
Expand description

Collect all SSE events from a stream into a single response body

This is useful for testing or when you know the stream is finite.