SSE streaming
Sendpad has first-class support for Server-Sent Events (SSE) — no new file format required. Any .http or .flow response with Content-Type: text/event-stream is automatically detected and routed to a live event timeline in the Results Panel.
Auto-detection
Section titled “Auto-detection”Just send a normal request. If the server responds with text/event-stream, the Results Panel switches to streaming mode:
### Stream tokensGET https://api.openai.example/v1/chat/completionsAccept: text/event-streamContent-Type: application/json
{ "model": "gpt-4", "messages": [...], "stream": true }You’ll see events appear one-by-one as the server emits them, each with a timestamp, event name, and pretty-printed data payload.
Live event timeline
Section titled “Live event timeline”While a stream is active the Results Panel shows:
- Event count and elapsed time
- Filter by event name or free-text search in payload data
- Copy all as JSONL
- Stop to close the stream manually
When the stream ends (server event: done, connection close, or @sse-timeout), a summary bar shows total events, bytes, and duration.
Assertion directives (Pro)
Section titled “Assertion directives (Pro)”In .http and .flow files you can assert on events without custom code:
### Stream completionGET {{baseUrl}}/v1/chat/completionsAccept: text/event-stream
# @expect event message_start within 5000# @expect event content_block_delta count >= 3# @expect event done# @extract event last = content_block_delta# @assert last contains "hello"| Directive | Description |
|---|---|
# @expect event <name> | Require at least one event with this name |
# @expect event <name> within <ms> | With a per-event timeout |
# @expect event <name> count >= <n> | Require at least N events |
# @extract event <var> = <name> | Capture the last payload of the named event |
# @sse-timeout <ms> | Override the default stream timeout |
# @sse-reconnect on|off | Auto-reconnect if the stream drops (default off) |
Extraction
Section titled “Extraction”@extract event <var> = <name> stores the last payload of the named event as a normal variable — available to subsequent flow steps:
### StreamPOST {{baseUrl}}/stream# @extract event final = message_stop
### Use captured dataPOST {{baseUrl}}/log{ "traceId": "{{final.trace_id}}" }Timeouts & reconnect
Section titled “Timeouts & reconnect”@sse-timeoutsets the maximum total stream duration. Default: 60 s.@sse-reconnect on(Pro) re-opens the stream on disconnect, respecting anyretry:directive from the server.
Free vs Pro
Section titled “Free vs Pro”| Capability | Free | Pro |
|---|---|---|
| Auto-detection + live timeline | ✓ | ✓ |
| Event filter + search + copy | ✓ | ✓ |
@expect event, @extract event assertions | — | ✓ |
@sse-reconnect auto-reconnect | — | ✓ |