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

[aws|storage] Add options argument to delete_object to set headers

This commit is contained in:
Michael Linderman 2011-02-23 11:16:22 -08:00
parent 051e8c0c5e
commit 218e57b338

View file

@ -16,10 +16,11 @@ module Fog
# ==== See Also
# http://docs.amazonwebservices.com/AmazonS3/latest/API/RESTObjectDELETE.html
def delete_object(bucket_name, object_name)
request({
def delete_object(bucket_name, object_name, options = {})
headers = options
request({
:expects => 204,
:headers => {},
:headers => headers,
:host => "#{bucket_name}.#{@host}",
:idempotent => true,
:method => 'DELETE',
@ -31,7 +32,7 @@ module Fog
class Mock # :nodoc:all
def delete_object(bucket_name, object_name)
def delete_object(bucket_name, object_name, options = {})
response = Excon::Response.new
if bucket = @data[:buckets][bucket_name]
response.status = 204