HTTP Hypertext Transfer Protocol, is a short connection, is the client actively send the request server to respond, the server response after the disconnection. HTTP is an application-level protocol to an object that has two classes of messages: a request message and a response message. HTTP request message: An HTTP request message is requested by the request line header. The blank line and the request line data 4 part of the HTTP response message: Three parts: the status line. Message header response Body GET request: Parameter stitching after address no request data is unsafe (because all parameters are stitched behind the address). Not suitable for transferring large amounts of data (limited length, 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. Put the submitted data in the HTTP package <request> get submitted data will be displayed in the Address bar And the post submission Address bar will change. The size of the transfer data when get commits, the transmitted data is limited by the URL length POST because it is not theoretically unrestricted via URL transfer
Security: POST security is higher than get security;
The user name and password of the get submit data will appear in the URL such as 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 is the difference between a network request get and POST? Features of the HTTP protocol