Fix My Own Mistake (GET Triggered an error)

Signed-off-by: George Sibble <gsibble@gmail.com>
This commit is contained in:
George Sibble 2013-03-04 19:58:59 -06:00
parent c032b3c2d4
commit 29a132496e
2 changed files with 12 additions and 2 deletions

View File

@ -44,7 +44,12 @@ class ApiClient:
data = None
if queryParams:
if method in ['GET']:
#Options to add statements later on and for compatibility
pass
elif queryParams:
# Need to remove None values, these should not be sent
sentQueryParams = {}
for param, value in queryParams.items():

View File

@ -52,7 +52,12 @@ class ApiClient:
sentQueryParams[param] = value
url = url + '?' + urllib.parse.urlencode(sentQueryParams)
if method in ['POST', 'PUT', 'DELETE']:
if method in ['GET']:
#Options to add statements later on and for compatibility
pass
elif method in ['POST', 'PUT', 'DELETE']:
if postData:
headers['Content-type'] = 'application/json'