Merge pull request #4152 from mbohlool/fix_python_client

Select application/json content-type in python generated client, if */* is in the list of content-types
This commit is contained in:
wing328 2016-11-08 11:11:06 +08:00 committed by GitHub
commit c54797bcef
2 changed files with 2 additions and 2 deletions

View File

@ -462,7 +462,7 @@ class ApiClient(object):
content_types = list(map(lambda x: x.lower(), content_types)) content_types = list(map(lambda x: x.lower(), content_types))
if 'application/json' in content_types: if 'application/json' in content_types or '*/*' in content_types:
return 'application/json' return 'application/json'
else: else:
return content_types[0] return content_types[0]

View File

@ -462,7 +462,7 @@ class ApiClient(object):
content_types = list(map(lambda x: x.lower(), content_types)) content_types = list(map(lambda x: x.lower(), content_types))
if 'application/json' in content_types: if 'application/json' in content_types or '*/*' in content_types:
return 'application/json' return 'application/json'
else: else:
return content_types[0] return content_types[0]