lib/restclient/net_http_ext.rb in rest-client-next-1.1.0 vs lib/restclient/net_http_ext.rb in rest-client-next-1.3.0

- old
+ new

@@ -4,18 +4,18 @@ # # Taken from: # http://www.missiondata.com/blog/ruby/29/streaming-data-to-s3-with-ruby/ module Net - class HTTP - alias __request__ request + class HTTP + alias __request__ request - def request(req, body=nil, &block) - if body != nil && body.respond_to?(:read) - req.body_stream = body - return __request__(req, nil, &block) - else - return __request__(req, body, &block) - end - end - end + def request(req, body=nil, &block) + if body != nil && body.respond_to?(:read) + req.body_stream = body + return __request__(req, nil, &block) + else + return __request__(req, body, &block) + end + end + end end