Module: DbAgile::Restful::Client::Delete
- Included in:
- DbAgile::Restful::Client
- Defined in:
- lib/dbagile/restful/client/delete.rb
Instance Method Summary collapse
-
#delete(path, projection = nil) ⇒ Object
Makes a delete request.
Instance Method Details
#delete(path, projection = nil) ⇒ Object
Makes a delete request
7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/dbagile/restful/client/delete.rb', line 7 def delete(path, projection = nil) with_uri(path, projection) do |uri| Net::HTTP.start(uri.host, uri.port) {|http| req = Net::HTTP::Delete.new(uri.path) req.set_form_data(projection) unless projection.nil? res = http.request(req) yield(res, http) res.body } end end |