diff --git a/modules/swagger-codegen/src/main/resources/python/rest.mustache b/modules/swagger-codegen/src/main/resources/python/rest.mustache index 1a6cf193b6c..bb3747021f5 100644 --- a/modules/swagger-codegen/src/main/resources/python/rest.mustache +++ b/modules/swagger-codegen/src/main/resources/python/rest.mustache @@ -121,7 +121,7 @@ class RESTClientObject(object): if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']: if query_params: url += '?' + urlencode(query_params) - if headers['Content-Type'] == 'application/json': + if headers['Content-Type'].find('+json') != -1: request_body = None if body: request_body = json.dumps(body)