HTTP / 1.1 Status Code

, Return results HTTP status code

HTTP status code that represents the result of the client is responsible for HTTP requests, marking the server is abnormal, an error notification appears and so on.

name Category resolve The reasons of
1XX Informational status codes (Informational) Accepted request is being processed
2XX Successful status code (Success) The request is processed normally completed
3XX Redirect status (Redirection) Additional operation required to complete the request
4XX Client Error status code (Client Error) Service can not process the request
5XX Server Error status code (Server Error) Server processes the request error

http protocol specification provides several status code 60, while commonly used in daily development following 14 kinds:

status code The reasons of
200 OK The client requests the server has been processed normally, such as when using the GET method, the resource request to return to normal
204 No Content The client server request has been processed normally, but returns a response message body portion is free, no side effects
206 Partial Content Range of the client's request (request header contains Content-Range), the server has successfully processed.
301 Moved Permanently Permanent Redirect. Request updated resource path, redirected to find. After the request url forgot to bring /it prone to error
302 Found Temporary Redirect. Resource path has been updated, hope the new user resource path this visit
304 Not Modified Server resource has not changed, the client can be used directly unexpired cache. Returned a short time repeat the same static resource request, return response headers, response body is not returned, save time network requests
400 Bad Request Request message syntax errors
401 Unauthorized Need to fill in HTTP authentication information, Authenticate header need to carry user information
403 Forbidden User authentication information is not passed, did not gain access to the system
404 No Found I did not find the requested resource
500 Internal Server Error A server error occurred, it could be a temporary failure
501
502
503 Service Unavailable The server is temporarily unable to process the request, overloaded or under maintenance

Note: Status code specification for reference. Expression of specific communication scenario code state required client and server developers determined after analysis.

Reference document: "graphic HTTP"

Published 18 original articles · won praise 10 · views 613

Guess you like

Origin blog.csdn.net/llq886/article/details/104879271