mirror of
https://github.com/valitydev/openapi-generator.git
synced 2024-11-08 11:23:58 +00:00
Python vnd content-type header support
Adding vendor header support like : "Content-Type: application/vnd.api+json" and "Content-Type: application/vnd.api+json; version=1"
This commit is contained in:
parent
873e3974ed
commit
df695ee2c4
@ -121,7 +121,7 @@ class RESTClientObject(object):
|
|||||||
if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']:
|
if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']:
|
||||||
if query_params:
|
if query_params:
|
||||||
url += '?' + urlencode(query_params)
|
url += '?' + urlencode(query_params)
|
||||||
if headers['Content-Type'] == 'application/json':
|
if headers['Content-Type'].find('+json') != -1:
|
||||||
request_body = None
|
request_body = None
|
||||||
if body:
|
if body:
|
||||||
request_body = json.dumps(body)
|
request_body = json.dumps(body)
|
||||||
|
Loading…
Reference in New Issue
Block a user