1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00

cleanup request methods, make sure to merge params[:headers]

This commit is contained in:
Wesley Beary 2009-11-30 17:01:25 -08:00
parent 4099ba9310
commit a8cc55e75c
3 changed files with 3 additions and 13 deletions

View file

@ -95,17 +95,7 @@ module Fog
params[:headers]['Date'] = Time.now.utc.strftime("%a, %d %b %Y %H:%M:%S +0000")
params[:headers]['Authorization'] = "AWS #{@aws_access_key_id}:#{signature(params)}"
response = @connection.request({
:block => params[:block],
:body => params[:body],
:expects => params[:expects],
:headers => params[:headers],
:host => params[:host],
:method => params[:method],
:parser => params[:parser],
:path => params[:path],
:query => params[:query]
})
response = @connection.request(params)
response
end

View file

@ -66,7 +66,7 @@ module Fog
:expects => params[:expects],
:headers => {
'X-Auth-Token' => @auth_token
},
}.merge!(params[:headers] || {}),
:host => @host,
:method => params[:method],
:path => "#{@path}/#{params[:path]}"

View file

@ -51,7 +51,7 @@ module Fog
response = @connection.request({
:body => params[:body],
:expects => params[:expects],
:headers => headers,
:headers => headers.merge!(params[:headers] || {}),
:host => @host,
:method => params[:method],
:parser => params[:parser],