Skip to content

Commit

Permalink
Merge pull request #59 from sailthru/fix_gets
Browse files Browse the repository at this point in the history
GET requests do not need to send data. Breaks some webservers.
  • Loading branch information
peterzal committed Jun 9, 2016
2 parents 5dc515c + 71d56d3 commit bfb587d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion sailthru/sailthru_http.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())}
Expand Down

0 comments on commit bfb587d

Please sign in to comment.