-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feat: Custom request body for Webhook Notifications #3088
Conversation
fc3f54f
to
7df3aa0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have left some small inline comments
bfacf92
to
8955c38
Compare
Trying to test it using http://localhost:3001/test-webhook and submit it without content-type.
|
The "form-urlencoded" default is provided by axios. I can override this default to something like The strange body is probably because express is attempting to parse it into a javascript object. I use a rust program to print the body as string and it works fine. |
Express parses fine if you follow the format of
|
I got your point, I somehow wrongly thought the custom body must be a json due to the example in the placeholder. |
https://github.com/louislam/uptime-kuma/blob/master/CONTRIBUTING.md#can-i-create-a-pull-request-for-uptime-kuma
Tick the checkbox if you understand [x]:
Description
Basically a continuation of #751, but only for Webhook notifications.
There is a trend of people using the Webhook notification type for other notification providers, but the body does not conform to the need of specific providers, therefore errors are encountered (#3087, #3084, #2967, #2960, #2845, #1160, #949). Allowing users to define a custom body would make Webhook actually useful.
This still doesn't solve the case for variables in query string tho. (#2813)
Type of change
Checklist
(including JSDoc for methods)
Screenshots (if any)