mirror of
https://github.com/OpenAPITools/openapi-generator.git
synced 2025-12-10 22:42:43 +00:00
[Bug][Python]Support body as bytes when Content-Type is unknown (#2626)
* Support body as bytes when Content-Type is unknownfix #2623 * Revert unwanted import changes * update samples/openapi3
This commit is contained in:
committed by
William Cheng
parent
0ae43fcb7a
commit
567eb6cdd3
@@ -189,7 +189,7 @@ class RESTClientObject(object):
|
||||
# Pass a `string` parameter directly in the body to support
|
||||
# other content types than Json when `body` argument is
|
||||
# provided in serialized form
|
||||
elif isinstance(body, str):
|
||||
elif isinstance(body, str) or isinstance(body, bytes):
|
||||
request_body = body
|
||||
r = self.pool_manager.request(
|
||||
method, url,
|
||||
|
||||
Reference in New Issue
Block a user