class Gem::Net::HTTP::Delete
Class for representing HTTP method DELETE:
require 'rubygems/vendor/net-http/lib/net/http' uri = Gem::URI('http://example.com') hostname = uri.hostname # => "example.com" uri.path = '/posts/1' req = Gem::Net::HTTP::Delete.new(uri) # => #<Gem::Net::HTTP::Delete DELETE> res = Gem::Net::HTTP.start(hostname) do |http| http.request(req) end
See Request Headers.
Properties:
-
Request body: optional.
-
Response body: yes.
-
Safe: no.
-
Idempotent: yes.
-
Cacheable: no.
Related:
-
Gem::Net::HTTP#delete
: sendsDELETE
request, returns response object.
Constants
- METHOD
- REQUEST_HAS_BODY
- RESPONSE_HAS_BODY