mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 11:32:20 -05:00
Switch from urlencode to json
Per the Pushbullet API (https://docs.pushbullet.com/http/) the POST should use a JSON body, with content-type 'application/json'
This commit is contained in:
parent
afea7337dd
commit
8cdf1ddbee
@ -20,7 +20,7 @@
|
||||
|
||||
import base64
|
||||
from httplib import HTTPSConnection, HTTPException
|
||||
from urllib import urlencode
|
||||
import json
|
||||
from ssl import SSLError
|
||||
import sickbeard
|
||||
from sickbeard import logger, common
|
||||
@ -97,8 +97,9 @@ class PushbulletNotifier:
|
||||
'body': message.encode('utf-8'),
|
||||
'device_iden': pushbullet_device,
|
||||
'type': notificationType}
|
||||
http_handler.request(method, uri, body=urlencode(data),
|
||||
headers={'Authorization': 'Basic %s' % authString})
|
||||
data = json.dumps(data)
|
||||
http_handler.request(method, uri, body=data,
|
||||
headers={'Content-Type': 'application/json', 'Authorization': 'Basic %s' % authString})
|
||||
pass
|
||||
except (SSLError, HTTPException):
|
||||
return False
|
||||
|
Loading…
Reference in New Issue
Block a user