当前位置:网站首页>The difference between get and post request types

The difference between get and post request types

2022-07-06 06:51:00 CHENFENG Muyang

1. Preface


GET and POST The difference between request types ?

Although this problem is basic knowledge , But this is also a hot interview question , Make a summary and review

2. GET and POST The difference between


1. Use scenarios

GET The request method is generally used to obtain and delete data ,POST The request method is generally used to add and modify data

2. How to pass parameters

GET Passing parameters in request mode will splice parameters into URL In the address

POST Passing parameters in the request mode will put the parameters into the request body (Request Body) in

3. Security

GET Is an explicit commit , Low security ;POST Is an implicit commit , High security

4. The size of the data transferred

GET The size of data transmitted in request mode cannot be greater than 2KB, and POST There is no limit to the size of data transmitted by request

5. Upload files

GET The request method cannot upload files , and POST The request method can upload files

3. GET and POST Summary of the differences


GET The request method is generally used to obtain data , Will splice data to URL In the address , Belongs to explicit submission , Low security , The size of transmitted data is limited to 2KB within , Can't upload file

POST The request method is generally used to add and update data , The data will be stored in the request body , It belongs to implicit submission , High security , There is no size limit for the transmitted data , Files can be uploaded

原网站

版权声明
本文为[CHENFENG Muyang]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/187/202207060641426700.html