πŸ“‘

SSE Tester

Connect to Server-Sent Events streams and inspect real-time events live. Supports custom headers via EventSource polyfill fallback and cURL streaming.

GET
Disconnected
0 events 0s
Configuration
Note: The native EventSource API does not support custom headers. Use the generated cURL command below for Auth headers. The connection uses GET with browser cookies automatically.
Example Endpoints
Event Stream
SYS ready
Enter an SSE endpoint URL and click Connect.
cURL Streaming Command
Use -H 'Authorization: Bearer TOKEN' for authenticated streams.

About Server-Sent Events Tester

This tool connects to any SSE (Server-Sent Events) endpoint using the browser's native EventSource API and displays the incoming event stream in real time. Each event is shown with its type badge, timestamp, data payload, and optional Last-Event-ID so you can observe the stream structure as it arrives.

SSE is a one-directional streaming protocol β€” ideal for live dashboards, notification feeds, and AI token streams. The tool also generates a cURL streaming command so you can test authenticated streams that require custom headers, which the native EventSource API does not support.

Common Use Cases

How to Use

  1. Paste your SSE endpoint URL into the address bar β€” try the built-in Mercure demo to see it working immediately
  2. Optionally set a Last-Event-ID to resume a stream from a specific event, or enter event type names to filter
  3. Click "Connect" β€” events will appear in the Event Stream panel as they arrive from the server
  4. Copy the generated cURL command and add a -H 'Authorization: Bearer TOKEN' flag for endpoints requiring auth

Frequently Asked Questions

What is the difference between SSE and WebSockets?

SSE is a one-directional protocol β€” the server pushes events to the client over a persistent HTTP connection, and the client cannot send messages back. WebSockets are bidirectional. SSE is simpler to implement on the server, works over standard HTTP/2, and automatically reconnects if the connection drops. Use SSE for push-only data like notifications, feeds, or AI token streams.

Why can't I add custom headers in the browser SSE connection?

The browser's native EventSource API does not accept a headers option β€” it only sends cookies and standard browser headers. This is a browser security limitation. For endpoints that require an Authorization header, use the generated cURL command at the bottom of the page, which supports any header.

What does Last-Event-ID do?

Servers can assign an id field to each SSE event. When the connection drops and the browser reconnects, it sends this ID in a Last-Event-ID header so the server can resume the stream from where it left off, preventing missed events. Fill in the Last-Event-ID field to simulate a reconnection starting from a specific event.

Advertisement