The difference between get and post

1. The most intuitive difference is the semantic difference. Get is used to obtain data, and post is used to submit data.
2. The get parameter has a length limit (limited by the length of the url), but the post has no limit

Let’s talk about the first point in detail, and let’s talk about the conclusion first: reversing the two will cause very bad results.
For example, a web page address is: www.taobao.com?itemId=123
You send it to a friend and say that this thing is cool! This is the most correct way to obtain data using get, which is conducive to dissemination.

But if you use a post request to obtain a product page, and the URL is still http://www.taobao.com, then it makes no sense for you to share this URL with your friends.

On the other hand, if you use www.weibo.com?uid=1&content=haha&token=xxxxxxxxxx
to post a Weibo, and this URL is seen by others.
Then he can just copy the URL there and post it on Weibo for you. Isn’t that unreasonable?

Continuing Learning
||
<?php ehco "hello "; ?>
submitReset Code