Skip to content

Server-Sent Events

Courier listens to Server-Sent Events (SSE) streams and shows each event as it arrives.

### Price events
SSE https://postman-echo.com/server-events/5
Accept: text/event-stream

The request line is SSE followed by the URL.

Click Listen or press ⌘↵. Courier sends a GET request with Accept: text/event-stream, or a POST when the request has a body.

Each event shows with its event name, id, size and time. The stream stays open until the server ends it or you click Stop. Use the filter box to narrow the log.

The response handler (> {% … %}) runs once for each event, so client.test checks every event. See Scripts.

Variables, auth, proxies and certificates apply as for any HTTP request.

courier run listens to SSE requests for --ws-wait milliseconds (1000 by default) or until the server ends the stream, and reports the number of events. See courier run.