类 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
参见 请求头.
属性
相关
-
Net::HTTP#delete
:发送DELETE
请求,返回响应对象。
常量
- METHOD
- REQUEST_HAS_BODY
- RESPONSE_HAS_BODY