diff --git a/server/index.gohtml b/server/index.gohtml index a98ab62e..6449eb09 100644 --- a/server/index.gohtml +++ b/server/index.gohtml @@ -60,14 +60,20 @@

Publishing messages

- Publishing messages can be done via PUT or POST using. Topics are created on the fly by subscribing or publishing to them. + Publishing messages can be done via PUT or POST. Topics are created on the fly by subscribing or publishing to them. Because there is no sign-up, the topic is essentially a password, so pick something that's not easily guessable.

- Here's an example showing how to publish a message using curl: + Here's an example showing how to publish a message using curl (via POST):

- curl -d "long process is done" ntfy.sh/mytopic + curl -d "Backup successful 😀" ntfy.sh/mytopic + +

+ And another one using PUT: +

+ + echo -en "\u26A0\uFE0F Unauthorized login" | curl -sT- ntfy.sh/mytopic

Here's an example in JS with fetch() (see full example):