enum SF::Http::Response::Status

Overview

Enumerate all the valid status codes for a response

Defined in:

network/obj.cr

Enum Members

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 Method Summary

Instance Method Detail

def accepted? #

[View source]
def bad_gateway? #

[View source]
def bad_request? #

[View source]
def connection_failed? #

[View source]
def created? #

[View source]
def forbidden? #

[View source]
def gateway_timeout? #

[View source]
def internal_server_error? #

[View source]
def invalid_response? #

[View source]
def moved_permanently? #

[View source]
def moved_temporarily? #

[View source]
def multiple_choices? #

[View source]
def no_content? #

[View source]
def not_found? #

[View source]
def not_implemented? #

[View source]
def not_modified? #

[View source]
def ok? #

[View source]
def partial_content? #

[View source]
def range_not_satisfiable? #

[View source]
def reset_content? #

[View source]
def service_not_available? #

[View source]
def unauthorized? #

[View source]
def version_not_supported? #

[View source]