What is HTTP

 

 HTTP is what? HTTP is based on TCP / IP protocol on how to communicate data on how the World Wide Web.

     HTTP is the underlying TCP / IP. So the bottom GET and POST is TCP / IP, that is to say, GET / POST is a TCP connection. GET and POST can do is the same as the same. Plus you give GET request body, to bring POST url parameter, technically completely do the same in.

 

     In my world of big World Wide Web, TCP just like a car, we use TCP to transport data, it is very reliable, the phenomenon has never lost pieces of small pieces does not occur. But if the road running all look exactly the same car, it seems like the world is a mess, courier delivered the car in front of the car might be loaded with goods stopped blocking the road, the entire transport system will be paralyzed. To prevent this from happening, traffic rules HTTP born. HTTP transport to the car set several service categories, there are GET, POST, PUT, DELETE, and so on, HTTP provides that when performing a GET request, give the car a label affixed GET (setting method is GET), and requires data transmitted on the roof (url) is to facilitate recording. If POST request, POST will affix a label in the car, and the goods in the car. Of course, you can also go in the cabin GET secretly hidden point when the goods, but it is very disgraceful; can also put some data on the roof at POST when people feel silly. HTTP is just a code of conduct, while TCP is GET and POST how to achieve basic.
 
     I World Wide Web at large in the world, there is another important role: transportation companies. A different browser (http request initiated) and server (http accept the request) is different transportation companies. Although theoretically, you could infinite stack of goods (url in unlimited additional parameters) on the roof. But the transportation company was no fool, loading and unloading is also a great cost, they will limit traffic to a single control risk, too much data to the browser and the server is a great burden. It is the industry's unwritten regulations, (most) browsers usually limit url 2K bytes in length, and (most of) the size of the server process up to 64K url. The part in excess will not be processed. If you use the GET service request body secretly hidden in the data, handling different servers it is different, some servers will help you unload, read data, and some server directly ignored, so, although the GET request body can take, nor guaranteed to be received, oh.

Guess you like

Origin www.cnblogs.com/mark5/p/11075310.html
Recommended