As usual, throw a question: What is an interface?
Don't explain, Baidu Bar.
Learn to start with HTTP first.
features of the HTTP protocol :
1, No connection , that is, each connection is only processing a single request, the server after processing the customer's request, after receiving the customer's response, will be disconnected. This approach can save time.
2, Media independence , this means that as long as the server and the client know how to process the content of the data, any type of data can be sent over HTTP. The client and server specify that the appropriate Mime-type content type be used.
3, stateless , HTTP is a stateless protocol, stateless means that the protocol has no memory capacity for transaction processing, the lack of state means that if the subsequent need to process the previous information, then he must be re-transmitted, if the server does not need the previous information, then the response speed will be faster.
http request Method :
Depending on the HTTP standard, there are several HTTP request methods
Det/post/head/put/delete/trace/connect/options
Response Status Code :
1**: Information, the server receives the request and requires the requestor to perform the continuation operation.
2**: Successful, successful operation, and successful processing.
3**: Redirect requires further to complete the request.
4**: Client error, request contains a syntax error or a request that cannot be completed.
5**: Service-side error, the server found an error while processing the request
common status codes and status descriptions :
200OK: The request was successful. Typically used for get and post requests.
302 Fund: Temporary move, the resource is only temporarily moved, the client still uses the original URL
Bad Request: A syntax error for client requests that the server cannot understand
401 Unauthorized: Request for user authentication.
403 Forbidden: The server understands the request from the client, but refuses to execute the request.
404 Not Found: The server could not find resources based on client requests.
$ Internal Server Error: The server has internal errors and cannot complete this request.
503 Server Unavailable: Due to overloading or system maintenance, the server is temporarily unable to process client requests.
The basic review is here: on the main course!
The development of Web interface access and development system access is basically the same, in general, the root of the Setup interface is/api/
Give me a chestnut:
http://127.0.0.1:8000/api/add_event/# indicates adding a conference interface http://127.0.0.1:8000/api/get_event--list/ # indicates query conference interface
———————— to Be Continued ————————
Development of web interfaces