Class: Net::HTTP::Options
- Inherits:
-
Net::HTTPRequest
- Object
- Net::HTTPGenericRequest
- Net::HTTPRequest
- Net::HTTP::Options
- Defined in:
- lib/net/http/requests.rb
Overview
Class for representing HTTP method OPTIONS:
require 'net/http'
uri = URI('http://example.com')
hostname = uri.hostname # => "example.com"
req = Net::HTTP::Options.new(uri) # => #<Net::HTTP::Options OPTIONS>
res = Net::HTTP.start(hostname) do |http|
http.request(req)
end
See Request Headers.
Properties:
- Request body: optional.
- Response body: yes.
- Safe: yes.
- Idempotent: yes.
- Cacheable: no.
Related:
- Net::HTTP#options: sends
OPTIONSrequest, returns response object.
Constant Summary collapse
- METHOD =
'OPTIONS'- REQUEST_HAS_BODY =
false- RESPONSE_HAS_BODY =
true
Method Summary
Methods inherited from Net::HTTPRequest
Constructor Details
This class inherits a constructor from Net::HTTPRequest