Parent

Namespace

Files

Net::HTTP

Public Instance Methods

__request__(req, body=nil, &block) click to toggle source

Replace the request method in Net::HTTP to sniff the body type and set the stream if appropriate

Taken from: www.missiondata.com/blog/ruby/29/streaming-data-to-s3-with-ruby/

Alias for: request
request(req, body=nil, &block) click to toggle source
# File lib/restclient/net_http_ext.rb, line 46
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
Also aliased as: __request__

[Validate]

Generated with the Darkfish Rdoc Generator 2.