mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 11:32:20 -05:00
Fixed issues where data needing to be posted was being sent via a GET instead of POST
This commit is contained in:
parent
8bec8751fb
commit
3eed021200
@ -1263,7 +1263,12 @@ def getURL(url, post_data=None, params=None, headers=None, timeout=30, session=N
|
|||||||
"https": sickbeard.PROXY_SETTING,
|
"https": sickbeard.PROXY_SETTING,
|
||||||
}
|
}
|
||||||
|
|
||||||
resp = session.get(url, data=post_data, timeout=timeout)
|
# decide if we get or post data to server
|
||||||
|
if post_data:
|
||||||
|
resp = session.post(url, data=post_data, timeout=timeout)
|
||||||
|
else:
|
||||||
|
resp = session.get(url, timeout=timeout)
|
||||||
|
|
||||||
if not resp.ok:
|
if not resp.ok:
|
||||||
logger.log(u"Requested url " + url + " returned status code is " + str(
|
logger.log(u"Requested url " + url + " returned status code is " + str(
|
||||||
resp.status_code) + ': ' + clients.http_error_code[resp.status_code], logger.DEBUG)
|
resp.status_code) + ': ' + clients.http_error_code[resp.status_code], logger.DEBUG)
|
||||||
|
Loading…
Reference in New Issue
Block a user