Server-Sent Events (SSE)
A purpose-built viewer for text/event-stream endpoints. Connect, watch events flow in, filter by event type, and replay later.
What works
Section titled “What works”- Connect to any
text/event-streamURL. - Automatic reconnection — uses
Last-Event-IDto resume where you left off. - Per-event-type filtering — toggle event names on/off as they arrive.
- Long-running session — stays open until you disconnect; capped by your platform’s connection budget.
- JSON pretty-printing — when the event
data:is valid JSON. - Custom request headers — desktop only on web, the browser
EventSourceAPI doesn’t allow custom headers. Workaround on web: use a query-string token or path-based auth.
When SSE vs WebSocket
Section titled “When SSE vs WebSocket”- SSE is one-way (server → client). Perfect for log tailing, AI streaming responses, live notifications.
- WebSocket is bidirectional. Use it when the client also needs to send mid-stream.
- GraphQL subscriptions can ride either — see GraphQL.
- Many AI providers (OpenAI, Anthropic, OpenRouter) stream completions over SSE. Restura’s AI assistant does this internally.
- Use scripts to assert on event payloads —
pm.test("got a hello event", () => ...)style.
Related
Section titled “Related”- WebSocket
- AI assistant — uses SSE internally to stream provider responses.