The DidYouMean::Formatter
is the basic, default formatter for the gem. The formatter responds to the message_for
method and it returns a human readable string.
spell checker for a dictionary that has a tree structure, see doc/tree_spell_checker_api.md
Raised when the provided IP address is an invalid address.
Raised when the address is an invalid length.
This class is the base class for Net::HTTP request classes. The class should not be used directly; instead you should use its subclasses, listed below.
An request object may be created with either a URI
or a string hostname:
require 'net/http' uri = URI('https://jsonplaceholder.typicode.com/') req = Net::HTTP::Get.new(uri) # => #<Net::HTTP::Get GET> req = Net::HTTP::Get.new(uri.hostname) # => #<Net::HTTP::Get GET>
And with any of the subclasses:
req = Net::HTTP::Head.new(uri) # => #<Net::HTTP::Head HEAD> req = Net::HTTP::Post.new(uri) # => #<Net::HTTP::Post POST> req = Net::HTTP::Put.new(uri) # => #<Net::HTTP::Put PUT> # ...
The new instance is suitable for use as the argument to Net::HTTP#request
.
A new request object has these header fields by default:
req.to_hash # => {"accept-encoding"=>["gzip;q=1.0,deflate;q=0.6,identity;q=0.3"], "accept"=>["*/*"], "user-agent"=>["Ruby"], "host"=>["jsonplaceholder.typicode.com"]}
See:
You can add headers or override default headers:
# res = Net::HTTP::Get.new(uri, {'foo' => '0', 'bar' => '1'})
This class (and therefore its subclasses) also includes (indirectly) module Net::HTTPHeader
, which gives access to its methods for setting headers.
Subclasses for HTTP requests:
Subclasses for WebDAV requests:
Parent class for informational (1xx) HTTP
response classes.
An informational response indicates that the request was received and understood.
References:
Response class for Continue
responses (status code 100).
A Continue
response indicates that the server has received the request headers.
References:
Response class for Early Hints
responses (status code 103).
The Early Hints
indicates that the server has received and is processing the request, and contains certain headers; the final response is not available yet.
References:
Response class for Multi-Status (WebDAV)
responses (status code 207).
The Multi-Status (WebDAV)
response indicates that the server has received the request, and that the message body can contain a number of separate response codes.
References:
Response class for Found
responses (status code 302).
The Found
response indicates that the client should look at (browse to) another URL.
References:
Response class for Permanent Redirect
responses (status code 308).
This and all future requests should be directed to the given URI
.
References:
Response class for Bad Request
responses (status code 400).
The server cannot or will not process the request due to an apparent client error.
References:
Response class for Unauthorized
responses (status code 401).
Authentication is required, but either was not provided or failed.
References:
Response class for Payment Required
responses (status code 402).
Reserved for future use.
References:
Response class for Request Timeout
responses (status code 408).
The server timed out waiting for the request.
References:
Response class for Request Timeout
responses (status code 408).
The server timed out waiting for the request.
References:
Response class for Length Required
responses (status code 411).
The request did not specify the length of its content, which is required by the requested resource.
References:
Response class for Payload Too Large
responses (status code 413).
The request is larger than the server is willing or able to process.
References:
Response class for Range Not Satisfiable
responses (status code 416).
The request entity has a media type which the server or resource does not support.
References:
Response class for Misdirected Request
responses (status code 421).
The request was directed at a server that is not able to produce a response.
References:
Response class for Too Many Requests
responses (status code 429).
The user has sent too many requests in a given amount of time.
References:
Response class for Internal Server Error
responses (status code 500).
An unexpected condition was encountered and no more specific message is suitable.
References:
Response class for Variant Also Negotiates
responses (status code 506).
Transparent content negotiation for the request results in a circular reference.
References: