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:
commit
794f1159a2
5 changed files with 5 additions and 0 deletions
|
@ -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'
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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'
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue