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:
parent
051e8c0c5e
commit
218e57b338
1 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue