module HTTP
HTTP protocol implementation.
Classes and Modules
class StatusA small HTTP status wrapper that verifies the status code within a given range.
Definitions
STATUS_CODES = {...}
A list of commonly used HTTP status codes. For help choosing the right status code, see http://racksburg.com/choosing-an-http-status-code/
Implementation
STATUS_CODES = {
:success => 200,
:created => 201,
:accepted => 202,
:moved => 301,
:found => 302,
:see_other => 303,
:not_modified => 304,
:redirect => 307,
:bad_request => 400,
:unauthorized => 401,
:forbidden => 403,
:not_found => 404,
:not_allowed => 405,
:unsupported_method => 405,
:gone => 410,
:teapot => 418,
:unprocessible => 422, # The best status code for a client-side ArgumentError.
:error => 500,
:unimplemented => 501,
:unavailable => 503
}