類別 Net::HTTP::Delete

用於表示 HTTP 方法 DELETE 的類別

require 'net/http'
uri = URI('http://example.com')
hostname = uri.hostname # => "example.com"
uri.path = '/posts/1'
req = Net::HTTP::Delete.new(uri) # => #<Net::HTTP::Delete DELETE>
res = Net::HTTP.start(hostname) do |http|
  http.request(req)
end

請參閱 要求標頭

屬性

相關

常數

METHOD
REQUEST_HAS_BODY
RESPONSE_HAS_BODY