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

Merge pull request #1142 from grkvlt/accept-headers-openstack

Add Accept header with application/json media type to OpenStack requests
This commit is contained in:
Dan Prince 2012-11-13 12:06:24 -08:00
commit 794f1159a2
5 changed files with 5 additions and 0 deletions

View file

@ -114,6 +114,7 @@ module Fog
"#{uri.scheme}://#{uri.host}:#{uri.port}/v2.0/tenants", false, connection_options).request({
:expects => [200, 204],
:headers => {'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Auth-Token' => body['access']['token']['id']},
:host => uri.host,
:method => 'GET'

View file

@ -300,6 +300,7 @@ module Fog
response = @connection.request(params.merge({
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Auth-Token' => @auth_token
}.merge!(params[:headers] || {}),
:host => @host,

View file

@ -203,6 +203,7 @@ module Fog
response = @connection.request(params.merge({
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Auth-Token' => @auth_token
}.merge!(params[:headers] || {}),
:host => @host,

View file

@ -6,6 +6,7 @@ module Fog
response = @identity_connection.request({
:expects => [200, 204],
:headers => {'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Auth-Token' => @auth_token},
:method => 'GET',
:path => '/v2.0/tenants'

View file

@ -142,6 +142,7 @@ module Fog
response = @connection.request(params.merge({
:headers => {
'Content-Type' => 'application/json',
'Accept' => 'application/json',
'X-Auth-Token' => @auth_token
}.merge!(params[:headers] || {}),
:host => @host,