class Gem::Net::HTTP::Options
Class for representing HTTP method OPTIONS:
require 'rubygems/vendor/net-http/lib/net/http' uri = Gem::URI('http://example.com') hostname = uri.hostname # => "example.com" req = Gem::Net::HTTP::Options.new(uri) # => #<Gem::Net::HTTP::Options OPTIONS> res = Gem::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:
-
Gem::Net::HTTP#options
: sendsOPTIONS
request, returns response object.
Constants
- METHOD
- REQUEST_HAS_BODY
- RESPONSE_HAS_BODY