From 71d56d3126229e7e887a2d0a19b358a70352be20 Mon Sep 17 00:00:00 2001 From: peterzal Date: Thu, 9 Jun 2016 10:29:05 -0400 Subject: [PATCH] GET requests do not need to send data. Breaks some webservers. --- sailthru/sailthru_http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sailthru/sailthru_http.py b/sailthru/sailthru_http.py index 52428f0..28a783a 100644 --- a/sailthru/sailthru_http.py +++ b/sailthru/sailthru_http.py @@ -33,7 +33,7 @@ def sailthru_http_request(url, data, method, file_data=None): """ data = flatten_nested_hash(data) method = method.upper() - params = data if method != 'POST' else None + params, data = (None, data) if method == 'POST' else (data, None) try: headers = {'User-Agent': 'Sailthru API Python Client %s; Python Version: %s' % ('2.3.0', platform.python_version())}