mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Change webhook request data if not Content-Type header is not application/json
This commit is contained in:
parent
13374c9ded
commit
4740d0fbf3
1 changed files with 6 additions and 1 deletions
|
@ -3636,7 +3636,12 @@ class WEBHOOK(Notifier):
|
|||
if webhook_headers:
|
||||
headers.update(webhook_headers)
|
||||
|
||||
return self.make_request(self.config['hook'], method=self.config['method'], headers=headers, json=webhook_body)
|
||||
if headers['Content-Type'] == 'application/json':
|
||||
data = {'json': webhook_body}
|
||||
else:
|
||||
data = {'data': webhook_body}
|
||||
|
||||
return self.make_request(self.config['hook'], method=self.config['method'], headers=headers, **data)
|
||||
|
||||
def _return_config_options(self):
|
||||
config_option = [{'label': 'Webhook URL',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue