Skip to content
instance method

Net::HTTP#delete

(::String path, ?::Net::headers initheader) -> ::Net::HTTPResponse
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 · 3.3 · 3.2 · 3.1 · 3.0