- What are the features of the HTTP protocol:
- HTTP Hypertext Transfer Protocol, is a short connection, is the client actively sends the request, the server responds, the server responds after the connection disconnects
- HTTP is an application-level protocol to objects, HTTP has 2 types of messages: Request messages and response messages
- HTTP request message: An HTTP request message, consisting of 4 parts of the request line, the request header, the blank line, and the request row data
- HTTP response message: Consists of three parts: status line, message header, response body
- The difference between a network request get and POST
GET Request: Parameter stitching after address no request data is unsafe (because all parameters are stitched behind the address), not suitable for transmitting large amounts of data (limited, 1024 bytes) POST request: The parameter is more secure in the request data area than the GET request, and there is no limit to the size of the data. The data submitted in the <request> of the HTTP package will be displayed in the Address bar, and the post submission Address bar will change. When the size of the transfer data get committed, the transmitted data is limited by the URL length POST because it is not transmitted by URL theoretically unrestricted security: Post security is more secure than get, and a get-committed data user name and password will appear in plaintext in the URL For example, the login interface may be cached by the browser. Synchronous and asynchronous differences:
Synchronous Link: The main thread to request data, when the data request is complete, other threads are not responding, will cause the program on the phenomenon of suspended animation.
Asynchronous Link: will open a separate thread to handle the network request, the main thread is still in an interactive state, the program runs smoothly.
What are the characteristics of the HTTP protocol and the difference between a network request get and POST?