1. Request
2. Response
2.1 Response status code:
classification | Category Description |
---|---|
1** | Information, the server receives the request, the requester needs to continue operation |
2** | Successful operation has been successfully received and processed |
3** | Redirection , the server returns the new address, the client further action is required to complete the request |
4** | Client error , the request contains a syntax error or could not fulfill the request |
5** | Server Error The server error has occurred during the processing of the request |
2.2 status code list: https://www.runoob.com/http/http-status-codes.html
Common status codes and their meanings (restful api-style interfaces):
Is generally defined by development, no specific provisions are generally prescriptive.
- 200 OK
- 201 CREATED
- Create a resource successfully put or post
- 204 NO CONTENT
- Resource successfully modified, but did not return content
- Commonly used in the delete operation to return
-
- 301 permanent redirect
- 302 temporary redirect
- 401 Unauthorized
- Permission denied
- Typical: user is not logged, there is no corresponding access token and get direct access to a resource
- 403 Forbidden
- No Access
- Typical: While logged in, but need a higher authority to operate (delete / update) resources
- 405 METHOD NOT ALLOWED
- Method Not Allowed
- Typical: such a method does not allow post request, but you launched postqingq