lib/net/amazon/s3.rb
# Sends a properly-signed PUT request to the specified S3 path and returns a
# Net::HTTPResponse object.
# 
# If +content+ is an open IO stream, the body of the request will be read
# from the stream.
Sends a properly-signed PUT request to the specified S3 path and returns a
Net::HTTPResponse object.

If +content+ is an open IO stream, the body of the request will be read
from the stream.
Sends a properly - signed PUT request to the specified S3 path and returns a Net :: HTTPResponse object . If + content + is an open IO stream the body of the request will be read from the stream .
def request_put(path, content = nil, headers = {})
      http = Net::HTTP.new(REST_ENDPOINT, @options[:ssl] ? 443 : 80)
      http.use_ssl     = @options[:ssl]
      http.verify_mode = OpenSSL::SSL::VERIFY_NONE
      http.start do |http|
        req = sign_request(Net::HTTP::Put.new(path), content, headers)
        if content.is_a?(IO)
          req.body_stream = content
        else
          req.body = content
        end
        response = http.request(req)
        return response
      end
    end
def request_put ( path , content = nil , headers = { } ) http = Net :: HTTP . new ( REST_ENDPOINT , @options [ :ssl ] ? 443 : 80 ) http . use_ssl = @options [ :ssl ] http . verify_mode = OpenSSL :: SSL :: VERIFY_NONE http . start do | http | req = sign_request ( Net :: HTTP :: Put . new ( path ) , content , headers ) if content . is_a? ( IO ) req . body_stream = content else req . body = content end response = http . request ( req ) return response end end
Sends a properly-signed PUT request to the specified S3 path and returns a
Net::HTTPResponse object.
Sends a properly - signed PUT request to the specified S3 path and returns a Net :: HTTPResponse object .
path
<not_specific>
content
<not_specific>
headers
<not_specific>