From 34ca17acc43959309a7b6ecd60515f1a8a56ebb6 Mon Sep 17 00:00:00 2001 From: Rupak Ganguly Date: Wed, 13 Mar 2013 11:33:51 -0400 Subject: [PATCH] [hp] Add Accept header with application/json for all HP requests. --- lib/fog/hp/block_storage.rb | 1 + lib/fog/hp/cdn.rb | 1 + lib/fog/hp/compute.rb | 1 + lib/fog/hp/storage.rb | 2 ++ 4 files changed, 5 insertions(+) diff --git a/lib/fog/hp/block_storage.rb b/lib/fog/hp/block_storage.rb index 530251772..616f2ff50 100644 --- a/lib/fog/hp/block_storage.rb +++ b/lib/fog/hp/block_storage.rb @@ -144,6 +144,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, diff --git a/lib/fog/hp/cdn.rb b/lib/fog/hp/cdn.rb index 16473610c..3ced28ad1 100644 --- a/lib/fog/hp/cdn.rb +++ b/lib/fog/hp/cdn.rb @@ -128,6 +128,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, diff --git a/lib/fog/hp/compute.rb b/lib/fog/hp/compute.rb index 312c1e1af..f04e74ba0 100644 --- a/lib/fog/hp/compute.rb +++ b/lib/fog/hp/compute.rb @@ -227,6 +227,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, diff --git a/lib/fog/hp/storage.rb b/lib/fog/hp/storage.rb index b42466500..60178d4be 100644 --- a/lib/fog/hp/storage.rb +++ b/lib/fog/hp/storage.rb @@ -291,6 +291,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, @@ -316,6 +317,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,