Class: Gem::Net::HTTP::Delete
- Inherits:
-
Gem::Net::HTTPRequest
- Object
- Gem::Net::HTTPGenericRequest
- Gem::Net::HTTPRequest
- Gem::Net::HTTP::Delete
- Defined in:
- lib/rubygems/vendor/net-http/lib/net/http/requests.rb
Overview
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: sends
DELETE
request, returns response object.
Constant Summary collapse
- METHOD =
'DELETE'
- REQUEST_HAS_BODY =
false
- RESPONSE_HAS_BODY =
true
Constants included from Gem::Net::HTTPHeader
Gem::Net::HTTPHeader::MAX_FIELD_LENGTH, Gem::Net::HTTPHeader::MAX_KEY_LENGTH
Instance Attribute Summary
Attributes inherited from Gem::Net::HTTPGenericRequest
#body, #body_stream, #decode_content, #method, #path, #uri
Method Summary
Methods inherited from Gem::Net::HTTPRequest
Methods inherited from Gem::Net::HTTPGenericRequest
#[]=, #body_exist?, #exec, #initialize, #inspect, #request_body_permitted?, #response_body_permitted?, #set_body_internal, #update_uri
Methods included from Gem::Net::HTTPHeader
#[], #[]=, #add_field, #basic_auth, #chunked?, #connection_close?, #connection_keep_alive?, #content_length, #content_length=, #content_range, #content_type, #delete, #each_capitalized, #each_capitalized_name, #each_header, #each_name, #each_value, #fetch, #get_fields, #initialize_http_header, #key?, #main_type, #proxy_basic_auth, #range, #range_length, #set_content_type, #set_form, #set_form_data, #set_range, #size, #sub_type, #to_hash, #type_params
Constructor Details
This class inherits a constructor from Gem::Net::HTTPRequest