mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-31 03:50:11 -07:00
Add optional headers parameter for webhooks in notify API command
This commit is contained in:
parent
ddbd486500
commit
cfc30c1234
4 changed files with 5 additions and 1 deletions
|
@ -3613,6 +3613,7 @@ class WEBHOOK(Notifier):
|
|||
}
|
||||
|
||||
def agent_notify(self, subject='', body='', action='', **kwargs):
|
||||
subject = kwargs.get('headers', subject)
|
||||
if subject:
|
||||
try:
|
||||
webhook_headers = json.loads(subject)
|
||||
|
@ -3631,7 +3632,7 @@ class WEBHOOK(Notifier):
|
|||
else:
|
||||
webhook_body = None
|
||||
|
||||
headers = {'Content-type': 'application/json'}
|
||||
headers = {'Content-Type': 'application/json'}
|
||||
if webhook_headers:
|
||||
headers.update(webhook_headers)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue