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

Record and Zone put requests are idempotent.

This commit is contained in:
Peter Drake 2013-12-30 08:37:30 -05:00
parent 29b789dc9a
commit 17dbaa35f9
2 changed files with 10 additions and 8 deletions

View file

@ -19,10 +19,11 @@ module Fog
path = ["#{type}Record", zone, fqdn].join('/')
path += "/#{options.delete('record_id')}" if options['record_id']
request(
:body => Fog::JSON.encode(options),
:expects => 200,
:method => :put,
:path => path
:body => Fog::JSON.encode(options),
:expects => 200,
:idempotent => true,
:method => :put,
:path => path
)
end
end

View file

@ -14,10 +14,11 @@ module Fog
def put_zone(zone, options = {})
request(
:body => Fog::JSON.encode(options),
:expects => 200,
:method => :put,
:path => 'Zone/' << zone
:body => Fog::JSON.encode(options),
:expects => 200,
:idempotent => true,
:method => :put,
:path => 'Zone/' << zone
)
end
end