Skip to content

gurl sse

Connect to a Server-Sent Events (SSE) endpoint and print events as they arrive.

Synopsis

gurl sse <url> [flags]

The URL is required.

Flags

FlagShortDefaultDescription
--header-HnoneCustom header (key:value format)
--event-enoneOnly show events of this type
--last-event-id-LnoneLast-Event-ID header value, to resume after a reconnect
--timeout-T30Connection timeout in seconds
--json-jfalseParse and pretty-print JSON data
--color-cfalseEnable syntax highlighting for JSON output
--timestamp-tfalseShow a timestamp for each event
--raw-rfalseOutput raw data without formatting

Aliases

  • events
  • sse

Examples

Follow a stream

gurl sse https://api.example.com/events --json --timestamp

Only one event type

gurl sse https://api.example.com/events --event order.created

Resume from the last event you saw

gurl sse https://api.example.com/events -H 'Authorization:Bearer dev-token' --last-event-id 1042

Related commands