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

[rackspace] Don't parse JSON in delete_server

The Rackspace API replies with an empty response to delete_server
requests, but includes a header enforcing the application/json
content-type.

This commit disables JSON parsing on delete_server requests,
which prevents the appearance of these warnings:

[WARNING] Error Parsing response json - 781: unexpected token at ''
This commit is contained in:
David Wittman 2013-09-20 22:24:37 -05:00
parent bf4c376256
commit fae2b324af

View file

@ -12,11 +12,11 @@ module Fog
# @raise [Fog::Compute::RackspaceV2::ServiceError] # @raise [Fog::Compute::RackspaceV2::ServiceError]
# @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Delete_Server-d1e2883.html # @see http://docs.rackspace.com/servers/api/v2/cs-devguide/content/Delete_Server-d1e2883.html
def delete_server(server_id) def delete_server(server_id)
request( request({
:expects => [204], :expects => [204],
:method => 'DELETE', :method => 'DELETE',
:path => "servers/#{server_id}" :path => "servers/#{server_id}"
) }, false)
end end
end end