Open yaxia opened 7 years ago
@yaxia Thank you very much for bringing this up.
Using properties of File
class with checks on IO
class seems like a bug. I think we should support most possible scenarios for IO
as you mentioned IO
, File
and StringIO
as of now.
What are your views?
HttpRequest throws exception when the body is an
IO
object, because the code checks whether the body is anIO
object but it actually uses the APIs of theFile
(derived from theIO
object):body.size
andbody.path
.I am going to make a change to fix it. Here are some questions for discussion:
IO
orStringIO
object may also be the body, shall we support it?Thoughts? @vishrutshah , @veronicagg