forked from loafle/openapi-generator-original
Fixed encoding issue for request json body in python client.
This commit is contained in:
parent
cbbe29cf70
commit
d053d464dd
@ -85,6 +85,8 @@ class ApiClient(object):
|
||||
if 'Content-Type' not in headers:
|
||||
headers['Content-Type'] = 'application/json'
|
||||
data = json.dumps(postData)
|
||||
elif headers['Content-Type'] == 'application/json':
|
||||
data = json.dumps(postData)
|
||||
elif headers['Content-Type'] == 'multipart/form-data':
|
||||
data = self.buildMultipartFormData(postData, files)
|
||||
headers['Content-Type'] = 'multipart/form-data; boundary={0}'.format(self.boundary)
|
||||
|
@ -85,6 +85,8 @@ class ApiClient(object):
|
||||
if 'Content-Type' not in headers:
|
||||
headers['Content-Type'] = 'application/json'
|
||||
data = json.dumps(postData)
|
||||
elif headers['Content-Type'] == 'application/json':
|
||||
data = json.dumps(postData)
|
||||
elif headers['Content-Type'] == 'multipart/form-data':
|
||||
data = self.buildMultipartFormData(postData, files)
|
||||
headers['Content-Type'] = 'multipart/form-data; boundary={0}'.format(self.boundary)
|
||||
|
Loading…
x
Reference in New Issue
Block a user