From a5be27f57cb429f451a67717df35863c905653cb Mon Sep 17 00:00:00 2001 From: Chris Caron Date: Sun, 12 Jun 2022 17:26:45 -0400 Subject: [PATCH] Updated Notify_Custom_JSON (markdown) --- Notify_Custom_JSON.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/Notify_Custom_JSON.md b/Notify_Custom_JSON.md index 0c4046e..8bb4902 100644 --- a/Notify_Custom_JSON.md +++ b/Notify_Custom_JSON.md @@ -52,6 +52,29 @@ Send a JSON notification to our web server listening on port 80: apprise json://json.server.local ``` +### Payload Manipulation +Making use of the `:` on the Apprise URL allows you to alter and add to the content posted upstream to a remote server. + +```bash +# Add to the payload delivered to the remote server as if it was part +# the prepared message Apprise would have otherwise put together +# +# Assuming our {hostname} is localhost +# Assuming we want to include "sound": "oceanwave" as part of the existing payload: +apprise -vv -t "Test Message Title" -b "Test Message Body" \ + "json://localhost/?:sound=oceanwave" +``` + +The above would post a message such as: +```json +{ + "version": "1.0", + "title": "Test Message Title", + "message": "Test Message Body", + "type": "info", + "sound": "oceanwave" +} + ### Header Manipulation Some users may require special HTTP headers to be present when they post their data to their server. This can be accomplished by just sticking a plus symbol (**+**) in front of any parameter you specify on your URL string. ```bash