当前位置:网站首页>Doget and dopost
Doget and dopost
2022-07-25 16:15:00 【clear0217】
doGet And doPost
One 、 brief introduction
1、doGet
doGet Call to get server information , And put it back to the client as a corresponding . Through Web Browser or through HTML、JSP Direct access Servlet Of URL when , It's usually used Get call
2、doPost
It is used to transfer data from the client to the server , It can hide any data sent to the server .Post Suitable for sending large amounts of data .
Two 、 difference
1、 generation
get There are four ways to generate :1) Directly in URL Enter... In the address field URL.2) Hyperlinks in web pages .3)form in method by get.4)form in method It's empty time , The default is get Submit .
post generation :form in method The attribute is post.
2、 Data transmission mode
get The way : The form data is stored in URL After the address . all get When the method is submitted HTTP There is no message body in .
post The way : The form data is stored in HTTP The message body of the protocol is sent to the server in the form of entities .
3、 How the server obtains data
GET The way : The server uses request.QueryString To get the value of a variable .
POST The way : The server uses request.Form To get data .
4、 The amount of data transmitted
GET The way : There is a limit on the amount and length of data , Generally not more than 2kb. Because it is parameter passing , And in the address bar , Therefore, the amount of data is limited .
POST The way : Suitable for large-scale data transmission . Because it is transmitted in the form of entities .
5、 Security
GET The way : Poor safety . Because the data is directly displayed in the address bar , The browser has a buffer , User information can be recorded . So low security .
POST The way : High safety . because post When submitting data, we use HTTP post Mechanism , Is to place the fields and values in the form in HTTP HEADER Transfer to ACTION Referred to URL in , Users are invisible .
6、 On user refresh
GET The way : There will be no hint 、
POST The way : A prompt box will pop up , Ask the user whether to resubmit
边栏推荐
- MySQL tutorial 71-where conditional query data
- Ml image depth learning and convolution neural network
- MySQL页锁
- Leetcode:6127. Number of high-quality number pairs [bit operation finding rules + the sum of two numbers is greater than or equal to K + dichotomy]
- Introduction to redis
- 如何构建面向海量数据、高实时要求的企业级OLAP数据引擎?
- How matlab produces random complex sequences
- Typescript learning 2 - Interface
- Recommended collection, which is probably the most comprehensive coding method summary of category type features
- 解决Win10磁盘占用100%
猜你喜欢

【莎士比亚:保持做人的乐趣】

Ice 100g network card fragment message hash problem
![Leetcode:6127. Number of high-quality number pairs [bit operation finding rules + the sum of two numbers is greater than or equal to K + dichotomy]](/img/b5/5c7fc70b8025cf7ef21d645a3ac22e.png)
Leetcode:6127. Number of high-quality number pairs [bit operation finding rules + the sum of two numbers is greater than or equal to K + dichotomy]

What is the shortcut key for win11 Desktop Switching? Win11 fast desktop switching method

JWT diagram
![[image hiding] digital image watermarking method technology based on hybrid dwt-hd-svd with matlab code](/img/2a/b5214e9fa206f1872293c9b9d7bdb6.png)
[image hiding] digital image watermarking method technology based on hybrid dwt-hd-svd with matlab code

Which led display manufacturer is better
![[wechat applet] detailed explanation of applet host environment](/img/57/582c07f6e6443f9f139fb1af225ea4.png)
[wechat applet] detailed explanation of applet host environment

优必选大型仿人服务机器人Walker X的核心技术突破

How to build an enterprise level OLAP data engine for massive data and high real-time requirements?
随机推荐
02. Limit the parameter props to a list of types
【图像去噪】基于双立方插值和稀疏表示实现图像去噪matlab源码
0x80131500 solution for not opening Microsoft Store
Golang review summary
MySQL乐观锁
Save the image with gaussdb (for redis), and the recommended business can easily reduce the cost by 60%
Pagehelper.startpage is not effective
R语言使用gt包和gtExtras包漂亮地显示表格数据:gt_bar_plot函数和gt_plt_bar_pct函数可视化百分比条形图、原始数据的百分比条形、缩放后的数据的百分比条形、指定数据对齐宽度
国债年化利率太低了,有比国债逆回购年化利率还要高的理财产品吗?
Upgrade esxi6.7.0 to 7.0u3f (updated on July 12, 2022)
[image hiding] digital image watermarking method technology based on hybrid dwt-hd-svd with matlab code
MySQL global lock
General test case writing specification
tkinter模块高级操作(一)—— 透明按钮、透明文本框、自定义按钮及自定义文本框
MySQL intent lock
I interviewed 8 companies and got 5 offers in a week. Share my experience
MyBaits
聊聊如何用 Redis 实现分布式锁?
共享锁(Shared Lock)
Recommended collection, which is probably the most comprehensive coding method summary of category type features