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:
parent
4099ba9310
commit
a8cc55e75c
3 changed files with 3 additions and 13 deletions
|
@ -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
|
||||
|
|
|
@ -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]}"
|
||||
|
|
|
@ -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],
|
||||
|
|
Loading…
Reference in a new issue