Home> Common Problem> body text

What are the differences between GET and POST request methods?

coldplay.xixi
Release: 2020-06-28 14:51:20
Original
8134 people have browsed it

The differences between GET and POST request methods are: 1. GET generates one TCP data packet, while POST generates two TCP data packets; 2. GET requests can only be URL encoded, while POST supports multiple encoding methods. ;3. GET only accepts ASCII characters, while POST has no restrictions.

What are the differences between GET and POST request methods?

The differences between GET and POST request methods are:

GET and POST are the two basic methods of HTTP requests , GET generates one TCP data packet, and POST generates two TCP data packets.

  • GET is harmless when the browser rolls back, while POST will submit the request again.

  • The URL address generated by GET can be Bookmarked, but POST cannot.

  • GET requests will be actively cached by the browser, but POST will not unless manually set.

  • GET requests can only be URL encoded, while POST supports multiple encoding methods.

  • GET request parameters will be completely retained in the browser history, while parameters in POST will not be retained.

  • The parameters transmitted in the URL in the GET request are limited in length, but not in POST.

  • Regarding the data type of parameters, GET only accepts ASCII characters, while POST has no restrictions.

  • GET is less secure than POST because the parameters are directly exposed on the URL, so it cannot be used to pass sensitive information.

  • GET parameters are passed through the URL, and POST is placed in the Request body.

    Related learning recommendations:PHP Programming from beginner to master

The above is the detailed content of What are the differences between GET and POST request methods?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!