Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Add json vs data payloads in webhooks
Browse files Browse the repository at this point in the history
  • Loading branch information
myoung34 committed Feb 13, 2020
1 parent 48ed7b7 commit d32bfe5
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tilty/emitters/webhook.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,14 @@ def emit(self, **kwargs): # pylint: disable=no-self-use,unused-argument
Args:
"""
self.method(
if self.headers and 'json' in self.headers.get('Content-Type'):
return self.method(
url=self.url,
headers=self.headers,
json=self.payload,
)
return self.method(
url=self.url,
headers=self.headers,
json=self.payload,
data=self.payload,
)

0 comments on commit d32bfe5

Please sign in to comment.