Fix: Support streaming upload from requests. (#3062)
* Fix: Support streaming upload from requests. * [FIX] style. Co-authored-by: Gordon Cassie <gordon.cassie@closingfolders.com>
This commit is contained in:
parent
dcde2570b1
commit
b88f166099
2 changed files with 18 additions and 0 deletions
|
|
@ -184,6 +184,8 @@ class CallbackResponse(responses.CallbackResponse):
|
|||
body = None
|
||||
elif isinstance(request.body, six.text_type):
|
||||
body = six.BytesIO(six.b(request.body))
|
||||
elif hasattr(request.body, "read"):
|
||||
body = six.BytesIO(request.body.read())
|
||||
else:
|
||||
body = six.BytesIO(request.body)
|
||||
req = Request.from_values(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue