Skip to content

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.

Just send a normal request. If the server responds with text/event-stream, the Results Panel switches to streaming mode:

### Stream tokens
GET https://api.openai.example/v1/chat/completions
Accept: text/event-stream
Content-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.

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.

In .http and .flow files you can assert on events without custom code:

### Stream completion
GET {{baseUrl}}/v1/chat/completions
Accept: 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"
DirectiveDescription
# @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|offAuto-reconnect if the stream drops (default off)

@extract event <var> = <name> stores the last payload of the named event as a normal variable — available to subsequent flow steps:

### Stream
POST {{baseUrl}}/stream
# @extract event final = message_stop
### Use captured data
POST {{baseUrl}}/log
{ "traceId": "{{final.trace_id}}" }
  • @sse-timeout sets the maximum total stream duration. Default: 60 s.
  • @sse-reconnect on (Pro) re-opens the stream on disconnect, respecting any retry: directive from the server.
CapabilityFreePro
Auto-detection + live timeline
Event filter + search + copy
@expect event, @extract event assertions
@sse-reconnect auto-reconnect