Last active
August 29, 2015 14:06
-
-
Save joseluisq/33fa1a662e38dfc958df to your computer and use it in GitHub Desktop.
Javascript Hash of Common HTTP Status
This file contains 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
var HTTPStatusService = { | |
ok: { | |
code: 200, | |
msg: 'The request sent by the client was successful.' | |
}, | |
bad_request: { | |
code: 400, | |
msg: 'The syntax of the request was not understood by the server.' | |
}, | |
no_authorized: { | |
code: 401, | |
msg: 'The request needs user authentication.' | |
}, | |
forbidden: { | |
code: 403, | |
msg: 'The server has refused to fulfill the request.' | |
}, | |
not_found: { | |
code: 404, | |
msg: 'The document/file requested by the client was not found.' | |
}, | |
request_timeout: { | |
code: 408, | |
msg: 'The client failed to sent a request in the time allowed by the server.' | |
}, | |
error: { | |
code: 500, | |
msg: 'The request was unsuccessful due to an unexpected condition encountered by the server.' | |
}, | |
service_unavailable: { | |
code: 503, | |
msg: 'The request was unsuccessful to the server being down or overloaded.' | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment