gurl sse
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
| Flag | Short | Default | Description |
|---|---|---|---|
--header | -H | none | Custom header (key:value format) |
--event | -e | none | Only show events of this type |
--last-event-id | -L | none | Last-Event-ID header value, to resume after a reconnect |
--timeout | -T | 30 | Connection timeout in seconds |
--json | -j | false | Parse and pretty-print JSON data |
--color | -c | false | Enable syntax highlighting for JSON output |
--timestamp | -t | false | Show a timestamp for each event |
--raw | -r | false | Output raw data without formatting |
Aliases
eventssse
Examples
Follow a stream
gurl sse https://api.example.com/events --json --timestampOnly one event type
gurl sse https://api.example.com/events --event order.createdResume from the last event you saw
gurl sse https://api.example.com/events -H 'Authorization:Bearer dev-token' --last-event-id 1042Related commands
gurl ws- WebSocket connectionsgurl grpc- gRPC requestsgurl graphql- GraphQL queries