A status code of duties
Status code when the appropriate client makes a request to the server, the request returns the result described. By means of a status code, the user can know the server processed the request is normal, or an error has occurred.
Second, the status code categories
category | the reason | |
1xx | Information (code state information) | Accepted request is being processed |
2xx | Success (success status code) | Normal requests processed |
3xx | Redirection (Redirect Status Code) | Require additional requested operation has been completed |
4xx | Client Error (Client Error Status Code) | The server can not process the request |
5xx | Server Error (Server Error status code) | Server processes the request error |
Third, some common status codes
- Request processing 200 OK successful, returns information
- 204 No Content successfully processed the request, but the response packet is not returned themes
- 206 Partial Content client the scope of the request, the server successfully execute the request and returns the contents of a specified range of entities
- 301 Moved Permanently permanent redirect. Requested resource has been assigned to a new url
- 302 Found temporary redirect
- After 304 Not Modified conditional client sends a request, the server allows the request, but did not modify the contents and returns 304. That client can use the cached content
- 400 Bad Request request message for syntax errors. After the need to amend the request packet send request again
- 403 Forbidden access the requested resource was rejected by the server. Server is not necessary to give reasons for the refusal.
- Can not find the requested resource on the server 404 Not Found
- 500 Internet Server Error server error occurred while performing the request. It may be the bug or temporary obstacles Web applications
- 503 Service Unavailable server is overloaded or failed state. If you know in advance when they can solve the problem, time can be written Retry-after header field back to the client.
Reference: "HTTP graphic"