Skip to content

Commit da00f5c

Browse files
authored
Merge pull request #10098 from mikhailantoshkin/python-empty-payload
[Python] Fix empty payload with body = None
2 parents 13dbc0a + da31b75 commit da00f5c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

modules/swagger-codegen/src/main/resources/python/rest.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ class RESTClientObject(object):
147147
if query_params:
148148
url += '?' + urlencode(query_params)
149149
if re.search('json', headers['Content-Type'], re.IGNORECASE):
150-
request_body = None
150+
request_body = '{}'
151151
if body is not None:
152152
request_body = json.dumps(body)
153153
r = self.pool_manager.request(

0 commit comments

Comments
 (0)