Skip to content
instance method

Net::HTTPSession#delete

delete(path, initheader = {'Depth' => 'Infinity'})

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')
See also #copy #finish #continue_timeout= #get also in 4.1 · 3.4