instance method
Net::HTTPSession#delete
delete(path, initheader = {'Depth' => 'Infinity'})
lib/net/http.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.0.0/lib/net/http.rb, line 2201
def delete(path, initheader = {'Depth' => 'Infinity'})
request(Delete.new(path, initheader))
end
Sends a DELETE request to the server; returns an instance of a subclass of Net::HTTPResponse.
The request is based on the Net::HTTP::Delete object created from string path and initial headers hash initheader.
Example
http = Net::HTTP.new(hostname) http.delete('/todos/1')