Sha256: 3faeb5deec5e218a33407edb64222da7e55b55d80d580edc90cea4be61a4ac6c
Contents?: true
Size: 519 Bytes
Versions: 18
Compression:
Stored size: 519 Bytes
Contents
# # Replace the request method in Net::HTTP to sniff the body type # and set the stream if appropriate # # Taken from: # http://www.missiondata.com/blog/ruby/29/streaming-data-to-s3-with-ruby/ Net::HTTP.ssl_context_accessor(:tmp_dh_callback) module Net 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 end
Version data entries
18 entries across 18 versions & 2 rubygems