Recently I have been preparing for the interview, and today I suddenly got a question about HTTP status codes, so here are some common status codes
2xx
- 200: indicates that the request sent by the client is processed correctly on the server
- 204(no content): Indicates that the request succeeds, but the response packet does not contain the body of the entity
- 205(reset Request): indicates that the request is successful. However, the response packet does not contain the body part of the entity, but requires the requester to reset the content
- 206(Partial Content): Range request sent by the client
3xx
- 301: Permanent redirect, indicating that the requested resource has been assigned a new URL
- 302: Temporary redirect: the requested resource is temporarily assigned a new URL
- 303: Indicates that the requested resource has another URL that can be accessed through a GET request
- 304: Resource cache: indicates that the request sent by the client is allowed, but the request content is not changed
- 307: temporary redirection, where the client is expected to send a request to the new address without changing the request method
4xx
- 400: indicates that the requested packet has a syntax error
- 401: Indicates that the sent request must have the authentication information authenticated through HTTP
- 403: Indicates that the request is rejected by the server
- 404: The requested resource does not exist
5xx
- 500: An error occurred while the server was executing the request
- 501: The server does not support a function required for a blocking request
- 503: Indicates that the server is down (overloaded or being maintained).
The above is some common status codes, any errors or additions you can leave a message below