forked from loafle/openapi-generator-original
Fix My Own Mistake (GET Triggered an error)
Signed-off-by: George Sibble <gsibble@gmail.com>
This commit is contained in:
parent
c032b3c2d4
commit
29a132496e
@ -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():
|
||||
|
@ -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'
|
||||
|
Loading…
x
Reference in New Issue
Block a user