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:
parent
dc28c7be85
commit
2d4f0fa0db
5 changed files with 5 additions and 0 deletions
|
@ -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'
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue