Server-Sent Events (SSE)
Bruno supports Server-Sent Events (SSE) for REST requests. When a request expects a streamed response (Accept: text/event-stream), Bruno keeps the connection open and appends incoming data to the response panel in real time instead of hanging until the stream ends.
Use SSE to test and debug real-time APIs such as OpenAI-style streams, live event feeds, and other long-lived HTTP connections where the server pushes data continuously.
What are Server-Sent Events?
Server-Sent Events are a standard way for a server to push updates to a client over a single HTTP connection. Unlike WebSockets, SSE is unidirectional: the server streams data to the client.
| Feature | Regular HTTP | SSE |
|---|---|---|
| Connection | Closes after one response | Stays open while the stream is active |
| Data flow | One response body | Continuous event chunks |
| Typical use | CRUD APIs | Live updates, AI token streams, event feeds |
| Client control | Wait for completion | Cancel anytime while streaming |
How to send an SSE request
- Create or open an HTTP request in your collection.
- Set the method and URL for your streaming endpoint (for example, a chat completions or events URL).
- Open the Headers tab and add:
| Name | Value |
|---|---|
Accept |
text/event-stream |
- Click Send (or press
⌘ Enter/Ctrl Enter).
{/* screenshot: SSE request with Accept header and live response panel */}
Bruno detects the streamed response, keeps the connection open, and starts appending chunks to the Response panel as they arrive.
Streaming response behavior
While a stream is active:
- Incoming data is concatenated and shown live in the response body.
- The Send (→) button switches to a Cancel button.
- Elapsed time continues updating for as long as the stream stays open.
- The stream state resets when the server closes the connection or you cancel it.
Cancel an active stream
- While data is streaming, click the Cancel button in the URL bar (where Send normally appears).
- Bruno stops receiving new data, closes the connection, and resets the stream state.
- The response panel keeps the data received up to the cancellation point.
- The button returns to Send so you can run the request again.
Collection runs and CLI
Long-lived SSE connections would block a collection run indefinitely. To keep runners reliable:
- Collection Runner skips requests that use
Accept: text/event-stream. - Bruno CLI also skips those requests during
bru run.
Test SSE requests individually from the request tab. Use the Collection Runner or CLI for non-streaming requests in the same collection.
Accept: text/event-stream. Remove or disable the header for automated runs when you need the request to execute.
Example use cases
- AI / LLM APIs - Inspect token-by-token or chunked completion streams.
- Live event feeds - Watch notifications or status updates as the server pushes them.
- Long-lived monitoring endpoints - Debug keep-alive streams without waiting for a final close.
Tips
- Prefer an explicit
Accept: text/event-streamheader so Bruno treats the request as a stream. - Use Cancel to stop noisy or endless streams while debugging.
- Keep SSE requests out of CI collection runs, or tag/structure them so automated runs only execute finite HTTP requests.
- For bidirectional real-time protocols, use WebSocket instead of SSE.