Understanding Events
Anatomy of an SSE Event
Each SSE event can have multiple fields. Here's what each one means:
| Field | Required | Description |
|---|---|---|
| id | Optional | Unique identifier for the event. Used for reconnection - client sends Last-Event-ID header to resume. |
| event | Optional | Event type name. Defaults to message if not specified. Common types: update, error, ping |
| data | Required* | The actual event payload. Usually JSON, but can be any text. Multiple data: lines are joined with newlines. |
| retry | Optional | Suggested reconnection delay in milliseconds. Client should wait this long before reconnecting after a disconnect. |
* Technically, an event can have no data field, but in practice, events without data are rarely useful. An event is dispatched when a blank line is received.
Event Display
Each event in the list shows key information at a glance:
Click any event to expand it and see the full details with two viewing modes.
Expanded Event View
When you click an event, it expands to show the full content with two tabs:
{
"message": "Hello, world!",
"count": 123,
"timestamp": "2024-01-15T14:32:01Z"
}Shows the event data with automatic formatting:
- • JSON is pretty-printed with indentation
- • Non-JSON text is shown as-is
- • Best for reading and understanding data
Shows the event in SSE protocol format:
Copying Events
Click the copy button to copy the event to your clipboard:
Content Tab Copy
Copies only the data field, formatted as JSON if possible:
Raw Tab Copy
Copies the full SSE event in protocol format:
Special Cases
Multiline Data
SSE protocol supports multiline data using multiple data: lines:
Default Event Type
If no event: field is specified, the event type defaults to message. In Tigrister, events with type "message" don't show the type badge to reduce clutter.
Comments (Keep-Alive)
Lines starting with : are comments and are ignored. Servers often use these as keep-alive pings:
Comments don't appear in the event list since they contain no data.
Empty Events
An event with no data field or empty data is valid but shows as (empty)in the event list. These are rare but can be used for signaling.