Class: RestClient::Resource

Inherits:
Object
  • Object
show all
Defined in:
lib/ixtlan/remote/server.rb

Instance Method Summary collapse

Instance Method Details

#delete(payload = nil, additional_headers = {}, &block) ⇒ Object

allow payload on delete - breaks code using original method !!!!



26
27
28
29
30
31
32
33
34
35
# File 'lib/ixtlan/remote/server.rb', line 26

def delete(payload = nil, additional_headers={}, &block)
  headers = (options[:headers] || {}).merge(additional_headers)
  opts = options.merge( :method => :delete,
                        :url => url,
                        :headers => headers )
  if payload
    opts[:payload] = payload
  end
  Request.execute( opts, &(block || @block))
end