Closed catlee closed 2 years ago
Currently if you try to do something like
Faraday.post("https://httpbingo.org/post", StringIO.new("hello"), {'content-length': '5'})
you will get an ArgumentError raised from url_encoded.rb since it's trying to pass the StringIO object to Hash.
ArgumentError
url_encoded.rb
StringIO
Hash
This PR skips over bodies that respond to the :read method in addition to bodies that respond to the :to_str method.
:read
:to_str
List any remaining work that needs to be done, i.e:
Description
Currently if you try to do something like
you will get an
ArgumentError
raised fromurl_encoded.rb
since it's trying to pass theStringIO
object toHash
.This PR skips over bodies that respond to the
:read
method in addition to bodies that respond to the:to_str
method.Todos
List any remaining work that needs to be done, i.e: