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
|
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
|
# Need to remove None values, these should not be sent
|
||||||
sentQueryParams = {}
|
sentQueryParams = {}
|
||||||
for param, value in queryParams.items():
|
for param, value in queryParams.items():
|
||||||
|
@ -52,7 +52,12 @@ class ApiClient:
|
|||||||
sentQueryParams[param] = value
|
sentQueryParams[param] = value
|
||||||
url = url + '?' + urllib.parse.urlencode(sentQueryParams)
|
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:
|
if postData:
|
||||||
headers['Content-type'] = 'application/json'
|
headers['Content-type'] = 'application/json'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user