Http Request status code list
Status Code List request successful
200OK: the request is successfully executed and the corresponding data is returned, for example, GET succeeded.
201 Created: the object is Created successfully and corresponding resource data is returned, such as POST. After the object is Created, the response header should contain the header Location, pointing to the address of the newly Created resource.
202 Accepted: accept the request, but the creation cannot be completed immediately. For example, it involves a task that takes several hours to complete. The returned object should contain information about the current status and a pointer to the processing status monitor or status prediction, so that the client can obtain the latest status.
204No Content: the request is successfully executed and no corresponding resource data is returned, such as PATCH and DELETE.
Redirection
All the new redirected addresses must be returned in the Response Header Location.
301 Moved Permanently: the requested resource has been Permanently Moved to a new location.
302 Found: the requested resource now temporarily responds to the request from different Uris
303See Other: the response to the current request can be found on another URI. The client should use the GET method for the request.
307 Temporary Redirect: the response to the current request can be found on another URI. The client should keep the original request method for the request.
Conditional request
304Not Modified: The resource has not changed since the last request.
409 Conflict: the request operation conflicts with the current state of the resource.
412 Precondition Failed: the server fails to meet one or more of the prerequisites in the request header field.
Client errors
400Bad Request: the Request body contains a syntax error.
401 Unauthorized: the user identity must be verified. If the server does not allow the user to access resources even after authentication, the server should respond to 403 Forbidden
403 Forbidden: the server rejects execution.
404Not Found: the target resource cannot be Found.
405 Method Not Allowed: The target Method cannot be executed. The response should contain the Allow header and the content is an HTTP Method valid for this resource.
406Not Acceptable: the server does not support the Content format requested by the client, but the response contains the data in the format that the server can give, and declares the format name in Content-Type.
410 Gone: the requested resource has been deleted and can be used only when it is confirmed that this situation is permanent. Otherwise, we recommend that you use 404 Not Found.
413 Payload Too Large: the message entity of the POST or PUT request is Too Large.
415 Unsupported Media Type: the server does not support the format of data submitted in the request.
422 Unprocessable Entity: The request format is correct, but cannot be responded due to Semantic Errors
428 Precondition Required
Server errors
500 Internal Server Error: the Server encountered an unexpected situation that caused it to fail to process the request.
501Not Implemented: the server does not support a function required by the current request.
502Bad Gateway: When a Gateway or proxy server tries to execute a request, it receives an invalid response from the upstream server.
503 Service Unavailable: the server cannot process requests due to temporary server maintenance or overload. This situation is temporary and will be restored after a period of time. If latency can be predicted, the response can contain a Retry-After header to indicate the latency (the content can be a number, in seconds, or an Http protocol specified time format ). If this Retry-After information is not provided, the client should process it in the form of 500 response.
The difference between 501 and 405 is that 405 means that the server does not allow the client to do this. 501 means that the client may be able to do this, but the server has not yet implemented this function.