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

Jsonify all OS orchestration requests.

Updates the Orchestration request method so that *all* request
bodies with JSON responses get converted to JSON.

The previous code failed to convert some HTTP 2xx responses to
JSON.
This commit is contained in:
Dan Prince 2013-10-02 09:18:38 -04:00
parent c0af5b9c3a
commit 1854e9a040

View file

@ -163,7 +163,7 @@ module Fog
end
end
if response.status == 200 && !response.body.empty?
if !response.body.empty? and response.get_header('Content-Type') =~ /application\/json/ then
response.body = Fog::JSON.decode(response.body)
end