From b499577b33a4556ebeca26debcf07769b7585964 Mon Sep 17 00:00:00 2001 From: Yannik Schmidt Date: Wed, 10 Jun 2020 23:20:56 +0200 Subject: [PATCH] improve readme --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 06d64e6..70cb483 100644 --- a/README.md +++ b/README.md @@ -20,3 +20,16 @@ Simplistic server that connect to a Telegram bot, takes messages via *POST*-requ --interface INTERFACE Interface on which to listen (default: localhost) --port PORT Port on which to listen (default: 5000) --token-file TOKEN_FILE File containing the Bot-Token (default: bot.token) + +# HTTP Request +The HTTP request must be a *POST*-request, with *Content-Type: application/json* and a json-field containing the key *"message"* with the value being the message you want to send. + +The following locations are supported: + + /send-all # send a message to all subscribed clients + +# Example (curl) + + curl -X POST -H "Content-Type: application/json" --data '{"message":"hallo world"}' localhost:5000/send-all + +