Command-line client for Server-Sent Events(SSE).
npm install --global sse-cat
# or
yarn global add sse-cat
yarn install
yarn build
yarn global add "file:$(pwd)"
Usage: sse-cat [options] <url...>
Command-line client for Server-Sent Events(SSE).
Options:
-V, --version output the version number
--header <header...> Pass custom header(s) to server
--event <name...> Pass custom event(s) that need to be captured
--heartbeat-event <name>
--heartbeat-timeout <milliseconds>
-h, --help display help for command
sse-cat 'http://localhost:8080/sse'
sse-cat \
'http://localhost:8080/sse/1' \
'http://localhost:8080/sse/2'
sse-cat \
--header 'User-Agent: sse-cat' \
--header "Authorization: Bearer $TOKEN" \
-- 'http://localhost:8080/sse'
sse-cat \
--event 'message' \
--event 'custom-event' \
-- 'http://localhost:8080/sse'
The heartbeat checker will only be enabled when all heartbeat options are set.
sse-cat \
--heartbeat-event heartbeat \
--heartbeat-timeout 60000 \
'http://localhost:8080/sse'