HTTPresponse codes are three-digit numbers with an optional human-readable explanation.
The numbers are defined by RFC 2616 (for HTTP/1.1), but the text is only suggested
by RFC. The first digit of the numerical code indicates to which of five categories
RESTful Rails | 223
the response belongs. The categories are divided in this way so that a client that does
not understand an obscure response code can infer some semantic information about
the status (for example, whether the request succeeded or failed, and whether the
request should be tried again) by examining the status code??™s first digit.
1xx: Informational
These codes are used for protocol negotiations between client and server. This
series of status codes is not currently in wide use.
2xx: Success
A code in the 2xx series indicates that the request completed successfully. The
request may have either been processed immediately or accepted for processing.
3xx: Redirection
These codes indicate that the client must look elsewhere for the requested
resource. The new location is provided in the Location response header.
4xx: Client Error
These codes indicate that the server cannot understand, cannot fulfill, or refuses
to fulfill the client??™s request, apparently due to the client??™s error.
5xx: Server Error
5xx response codes indicate that the server understood the request but is incapable
of performing it, temporarily or permanently, due to a server error.
Pages:
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351