mirror of
https://github.com/ansible/awx.git
synced 2026-01-15 03:40:42 -03:30
Force requests to emit application/json
When sending webhook notifications
This commit is contained in:
parent
30ed7b487b
commit
60e012f75b
@ -32,7 +32,7 @@ class WebhookBackend(TowerBaseEmailBackend):
|
||||
self.headers['User-Agent'] = "Tower {}".format(get_awx_version())
|
||||
for m in messages:
|
||||
r = requests.post("{}".format(m.recipients()[0]),
|
||||
data=json.dumps(m.body),
|
||||
json=m.body,
|
||||
headers=self.headers)
|
||||
if r.status_code >= 400:
|
||||
logger.error(smart_text("Error sending notification webhook: {}".format(r.text)))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user