dgtlmoon / changedetection.io

The best and simplest free open source web page change detection, website watcher, restock monitor and notification service. Restock Monitor, change detection. Designed for simplicity - Simply monitor which websites had a text change for free. Free Open source web page change detection, Website defacement monitoring, Price change notification
https://changedetection.io
Apache License 2.0
16.84k stars 940 forks source link

Unable to send JSON as the body #2478

Closed TheKoakuma closed 2 months ago

TheKoakuma commented 2 months ago

Describe the bug I'm trying to implement the watcher to call a Whatsapp API deployed locally, but since changedetection sends the JSON data inside "message" key the API refuses to accept.

Version 0.45.25

To Reproduce

Steps to reproduce the behavior:

  1. On any watch go to edit > notifications
  2. Set the URL to the API in Notification URL List
  3. Set the JSON as required by the API in Notification Body
  4. Click on Send Test Notification
  5. Click on Notification Debug Logs

As it is being run on local environment, I am unable to share the watch

Expected behavior The contents of JSON being sent as request body outside "message" key

Screenshots image image

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

TheKoakuma commented 2 months ago

Resolved, passed the fixed options by url and only the message on body, e.g: json://mydockercontainer:3000/client/sendMessage/mysessionkey?:message=content&:contentType=string&:chatId=phonenumber%40c.us