Created
August 9, 2010 20:24
-
-
Save mtkd/516044 to your computer and use it in GitHub Desktop.
HTTP Response Codes in Ruby
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case code | |
when 200; "OK" | |
when 201; "Created" | |
when 202; "Accepted" | |
when 203; "Non-Authoritative Information" | |
when 204; "No Content" | |
when 205; "Reset Content" | |
when 206; "Partial Content" | |
when 300; "Multiple Choices" | |
when 301; "Moved Permanently" | |
when 302; "Found" | |
when 303; "See Other" | |
when 304; "Not Modified" | |
when 305; "Use Proxy" | |
when 306; "(Unused)" | |
when 307; "Temporary Redirect" | |
when 400; "Bad Request" | |
when 401; "Unauthorized" | |
when 402; "Payment Required" | |
when 403; "Forbidden" | |
when 404; "Not Found" | |
when 405; "Method Not Allowed" | |
when 406; "Not Acceptable" | |
when 407; "Proxy Authentication Required" | |
when 408; "Request Timeout" | |
when 409; "Conflict" | |
when 410; "Gone" | |
when 411; "Length Required" | |
when 412; "Precondition Failed" | |
when 413; "Request Entity Too Large" | |
when 414; "Request-URI Too Long" | |
when 415; "Unsupported Media Type" | |
when 416; "Requested Range Not Satisfiable" | |
when 417; "Expectation Failed" | |
when 500; "Internal Server Error" | |
when 501; "Not Implemented" | |
when 502; "Bad Gateway" | |
when 503; "Service Unavailable" | |
when 504; "Gateway Timeout" | |
when 505; "HTTP Version Not Supported" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment