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

[openstack] Add Accept header with application/json media type to requests

This commit is contained in:
Andrew Donald Kennedy 2012-09-12 01:45:56 +03:00
parent dc28c7be85
commit 2d4f0fa0db
5 changed files with 5 additions and 0 deletions

View file

@ -113,6 +113,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

@ -282,6 +282,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

@ -154,6 +154,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

@ -132,6 +132,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,