[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:
Sebastien Arod
2019-04-26 19:45:34 +02:00
committed by William Cheng
parent 0ae43fcb7a
commit 567eb6cdd3
3 changed files with 3 additions and 3 deletions

View File

@@ -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,