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

Commit

Permalink
Merge pull request #2 from myoung34/webhooks_json
Browse files Browse the repository at this point in the history
Add json vs data payloads in webhooks
  • Loading branch information
myoung34 authored Feb 13, 2020
2 parents 48ed7b7 + d32bfe5 commit 4d369a9
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 4d369a9

Please sign in to comment.