|
@ -164,8 +164,11 @@ class Webhook(HttpTransport): |
|
|
|
|
|
|
|
|
url = self.prepare(url, check, urlencode=True) |
|
|
url = self.prepare(url, check, urlencode=True) |
|
|
if self.channel.post_data: |
|
|
if self.channel.post_data: |
|
|
|
|
|
headers = {} |
|
|
|
|
|
if self.channel.content_type: |
|
|
|
|
|
headers["Content-Type"] = self.channel.content_type |
|
|
payload = self.prepare(self.channel.post_data, check) |
|
|
payload = self.prepare(self.channel.post_data, check) |
|
|
return self.post(url, data=payload.encode("utf-8")) |
|
|
|
|
|
|
|
|
return self.post(url, data=payload.encode("utf-8"), headers=headers) |
|
|
else: |
|
|
else: |
|
|
return self.get(url) |
|
|
return self.get(url) |
|
|
|
|
|
|
|
@ -230,7 +233,7 @@ class Pushbullet(HttpTransport): |
|
|
url = "https://api.pushbullet.com/v2/pushes" |
|
|
url = "https://api.pushbullet.com/v2/pushes" |
|
|
headers = { |
|
|
headers = { |
|
|
"Access-Token": self.channel.value, |
|
|
"Access-Token": self.channel.value, |
|
|
"Conent-Type": "application/json" |
|
|
|
|
|
|
|
|
"Content-Type": "application/json" |
|
|
} |
|
|
} |
|
|
payload = { |
|
|
payload = { |
|
|
"type": "note", |
|
|
"type": "note", |
|
|