1
0
Fork 0
mirror of https://github.com/binwiederhier/ntfy.git synced 2024-12-14 11:47:33 +00:00

Include link to websocket example in docs

This commit is contained in:
wunter8 2023-11-15 09:31:34 -07:00 committed by GitHub
parent 5acc6ad0c4
commit c2d6e0e316
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -190,9 +190,10 @@ format. Keepalive messages are sent as empty lines.
## WebSockets ## WebSockets
You may also subscribe to topics via [WebSockets](https://en.wikipedia.org/wiki/WebSocket), which is also widely You may also subscribe to topics via [WebSockets](https://en.wikipedia.org/wiki/WebSocket), which is also widely
supported in many languages. Most notably, WebSockets are natively supported in JavaScript. On the command line, supported in many languages. Most notably, WebSockets are natively supported in JavaScript. You may also want to
I recommend [websocat](https://github.com/vi/websocat), a fantastic tool similar to `socat` or `curl`, but specifically check out the [full example on GitHub](https://github.com/binwiederhier/ntfy/tree/main/examples/web-example-websocket).
for WebSockets. On the command line, I recommend [websocat](https://github.com/vi/websocat), a fantastic tool similar to `socat`
or `curl`, but specifically for WebSockets.
The WebSockets endpoint is available at `<topic>/ws` and returns messages as JSON objects similar to the The WebSockets endpoint is available at `<topic>/ws` and returns messages as JSON objects similar to the
[JSON stream endpoint](#subscribe-as-json-stream). [JSON stream endpoint](#subscribe-as-json-stream).