// server-sent events
Server-Sent Events
Resonance streams text/event-stream responses over a persistent connection, parsing each event and keeping the stream alive with automatic reconnection.
What It Does
- Streams
text/event-streamresponses over a persistent connection - Sends custom headers on the initial handshake
- Displays each event with its
event,id,retry, anddatafields - Reconnects automatically, honoring the server’s
retryinterval - Resumes with
Last-Event-IDafter a reconnect so you don’t miss events - Shows the connection lifecycle: connecting, connected, reconnecting, closed, error
- Persists the transcript per tab
Connecting
- Create a request with an SSE endpoint URL — Resonance switches to SSE mode
- Add any headers required for the handshake, such as an auth token
- Click Connect — events stream into the transcript as the server emits them
Reading Events
Each event is shown with its individual fields parsed out, so you can read the event name, id, suggested retry interval, and data payload separately rather than as one raw blob.
Reconnection & Resumption
- If the connection drops, Resonance waits the server’s
retryinterval and reconnects - It sends the
Last-Event-IDheader so the server can resume from where you left off - The lifecycle status reflects connecting, reconnecting, and closed states throughout
Troubleshooting
No events appear
- Confirm the server responds with
Content-Type: text/event-stream - Make sure the server flushes events rather than buffering the whole response
Constant reconnecting
- Check the server’s
retryvalue and the stability of the connection - For
401/403, add the required handshake headers or auth token
Next Steps
- WebSocket — two-way streaming when you also need to send
- Getting Started — environments and variables for handshake headers