events: allow setting a mapping for webhook transport to customise request payloads
closes #1383 Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
@ -19,6 +19,14 @@ This will send a POST request to the given URL with the following contents:
|
||||
|
||||
The `Content-Type` header is set to `text/json`.
|
||||
|
||||
Starting in 2021.10, you can also select a Notification mapping. This allows you to freely configure the request's payload. For example:
|
||||
|
||||
```python
|
||||
return {
|
||||
"foo": context['notification'].body,
|
||||
}
|
||||
```
|
||||
|
||||
## Slack Webhook
|
||||
|
||||
This sends a request using the Slack-specific format. This is also compatible with Discord's webhooks by appending `/slack` to the Discord webhook URL.
|
||||
|
||||
Reference in New Issue
Block a user