Permalink
Browse files

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

…uests
  • Loading branch information...
1 parent dc28c7b commit 2d4f0fa0dbc1f8fe35d843500f258b461d6a14e9 @grkvlt grkvlt committed Sep 11, 2012
@@ -113,6 +113,7 @@ def self.authenticate_v2(options, connection_options = {})
"#{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'
@@ -282,6 +282,7 @@ def request(params)
response = @connection.request(params.merge({
:headers => {
'Content-Type' => 'application/json',
+ 'Accept' => 'application/json',
'X-Auth-Token' => @auth_token
}.merge!(params[:headers] || {}),
:host => @host,
@@ -154,6 +154,7 @@ def request(params)
response = @connection.request(params.merge({
:headers => {
'Content-Type' => 'application/json',
+ 'Accept' => 'application/json',
'X-Auth-Token' => @auth_token
}.merge!(params[:headers] || {}),
:host => @host,
@@ -6,6 +6,7 @@ def list_tenants
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'
@@ -132,6 +132,7 @@ def request(params)
response = @connection.request(params.merge({
:headers => {
'Content-Type' => 'application/json',
+ 'Accept' => 'application/json',
'X-Auth-Token' => @auth_token
}.merge!(params[:headers] || {}),
:host => @host,

0 comments on commit 2d4f0fa

Please sign in to comment.