Enumerate all the valid status codes for a response
Constants
Ok = 200
Most common code returned when operation was successful
Created = 201
The resource has successfully been created
Accepted = 202
The request has been accepted, but will be processed later by the server
NoContent = 204
The server didn't send any data in return
ResetContent = 205
The server informs the client that it should clear the view (form) that caused the request to be sent
PartialContent = 206
The server has sent a part of the resource, as a response to a partial GET request
MultipleChoices = 300
The requested page can be accessed from several locations
MovedPermanently = 301
The requested page has permanently moved to a new location
MovedTemporarily = 302
The requested page has temporarily moved to a new location
NotModified = 304
For conditional requests, means the requested page hasn't changed and doesn't need to be refreshed
BadRequest = 400
The server couldn't understand the request (syntax error)
Unauthorized = 401
The requested page needs an authentication to be accessed
Forbidden = 403
The requested page cannot be accessed at all, even with authentication
NotFound = 404
The requested page doesn't exist
RangeNotSatisfiable = 407
The server can't satisfy the partial GET request (with a "Range" header field)
InternalServerError = 500
The server encountered an unexpected error
NotImplemented = 501
The server doesn't implement a requested feature
BadGateway = 502
The gateway server has received an error from the source server
ServiceNotAvailable = 503
The server is temporarily unavailable (overloaded, in maintenance, ...)
GatewayTimeout = 504
The gateway server couldn't receive a response from the source server
VersionNotSupported = 505
The server doesn't support the requested HTTP version
InvalidResponse = 1000
Response is not a valid HTTP one
ConnectionFailed = 1001
Connection with server failed
Instance methods
accepted?
Returns true if this enum value equals Accepted
Sourcebad_gateway?
Returns true if this enum value equals BadGateway
Sourcebad_request?
Returns true if this enum value equals BadRequest
Sourceconnection_failed?
Returns true if this enum value equals ConnectionFailed
Sourcecreated?
Returns true if this enum value equals Created
Sourceforbidden?
Returns true if this enum value equals Forbidden
Sourcegateway_timeout?
Returns true if this enum value equals GatewayTimeout
Sourceinternal_server_error?
Returns true if this enum value equals InternalServerError
Sourceinvalid_response?
Returns true if this enum value equals InvalidResponse
Sourcemoved_permanently?
Returns true if this enum value equals MovedPermanently
Sourcemoved_temporarily?
Returns true if this enum value equals MovedTemporarily
Sourcemultiple_choices?
Returns true if this enum value equals MultipleChoices
Sourceno_content?
Returns true if this enum value equals NoContent
Sourcenot_found?
Returns true if this enum value equals NotFound
Sourcenot_implemented?
Returns true if this enum value equals NotImplemented
Sourcenot_modified?
Returns true if this enum value equals NotModified
Sourceok?
Returns true if this enum value equals Ok
Sourcepartial_content?
Returns true if this enum value equals PartialContent
Sourcerange_not_satisfiable?
Returns true if this enum value equals RangeNotSatisfiable
Sourcereset_content?
Returns true if this enum value equals ResetContent
Sourceservice_not_available?
Returns true if this enum value equals ServiceNotAvailable
Sourceunauthorized?
Returns true if this enum value equals Unauthorized
Sourceversion_not_supported?
Returns true if this enum value equals VersionNotSupported
Source