HTTP: Status Codes
Whenever you are typing in URLs in the address bar on the Internet, the chance for an error is eminent. What usually comes back is an HTTP Status Code.
Fortunately, the list of HTTP Status Codes is fairly short.
Successful Transactions
- 200
- The request was fulfilled.
- 201
- The POST request was completed successfully.
- 202
- Request accepted for processing of unknown type. Rare.
- 203
- Request partially fulfilled.
Redirection Transactions
- 301
- The requested resource has been permanently moved to a new URL. Usually accompanied by Location: new URL, which automatically connects to the new URL.
- 302
- Requested resource found, but at a different URL. You'll get a 302 Redirection if you omit the trailing slash when pointing at a directory (sometimes called a malformed request).
- 304
- Unmodified data not returned in response to a GET request with the If-Modified-Since field. Occurs when a browser requests data found in cache.
Error Messages
- 400
- Error in request syntax.
- 401
- Request requires an authorization field, and the client did not provide one. This response is accompanied by a list of acceptable authorization schemes use WWW-Authenticate response headers. Error 401 can be part of a client/server dialogue to negotiate encryption and user authentication schemes.
- 402
- The requested operation costs money, and the client did not specify a valid Charge to field.
- 403
- Request for forbidden resource denied.
- 404
- Requested resource not found.
- 500
- The server has encountered an internal error and cannot continue processing your request.
- 501
- Request okay but denied because server doesn't support transaction method.