当前位置:网站首页>Interface test practice | Detailed explanation of the difference between GET / POST requests
Interface test practice | Detailed explanation of the difference between GET / POST requests
2022-08-03 04:32:00 【Yehenara Hermione】
1. The method of the request line is different;
2. POST can attach body, and can support various data formats such as form, json, xml, binary, etc.;
3. From the perspective of general industry specifications,GET request is recommended for no state change, and POST request is recommended for data writing and status;
In order to avoid the interference of other factors, use Flask to write a simple Demo Server.
4. Install flask
5. Create a hello.py file
hello.py
6. Start the service
If the following information is prompted, the build is successful.
Initiate a GET request, send the a and b parameters into the URL, and save them in the get file:
Initiate a POST request, send the a and b parameters in form-data format, and save them in the post file:
Note: The right side of the > is the request content, and the left side of the < is the response content.
GET request process
POST request process
Compare the two files:

It can be clearly seen from the figure that the method of the GET request is GET, and the method of the POST request is POST. In addition, the GET request does not have the fields Content-Type and Content-Length, and the URL in the request line contains queryparameter, which is a format allowed for both requests.(End)
Recommend Hogwarts' "Test Development from Beginner to Advanced Combat System Advancement" course, which is close to the first-line practice content of major manufacturers and leads the industry.
5 months from the shallow to the deep, intensive training, led by the test master Sihan, teaching them how to fish, and through 10+ enterprise-level project actual combat drills, it will take you to master the necessary core skills of BAT test development engineers in one stop (Benchmark Alibaba P6+, challenge annual salary of 50W+)!Students directly push the test managers of famous BAT companies, and the salary is generally increased by 50%+!
Improve your core competitiveness
边栏推荐
- js中的闭包
- 记录一些遇见的bug——mapstruct和lombok同时使用时,转换实体类时数据丢失问题
- rosbag工具plotjuggler无法打开rosbag的问题
- 2022 Henan Mengxin League Game (4): Zhengzhou University of Light Industry E - Sleep Well
- 肖sir__简历
- 接口测试如何准备测试数据
- Oracle EMCC可以独立安装吗?还是必须安装到数据库服务器上?
- Browser listens for tab closing
- 「短视频+社交电商」营销模式爆发式发展,带来的好处有什么?
- DC-4靶场搭建及渗透实战详细过程(DC靶场系列)
猜你喜欢
随机推荐
肖sir___面试就业课程____app
关于#sql#的问题,如何解决?
js的垃圾回收机制
接口测试框架实战(四)| 搞定 Schema 断言
超好用的画图工具推荐
寄存器(内存访问)
mysql 创建索引的三种方式
JS底层手写
unity2D横板游戏教程6-敌人AI以及受击动画
移动流量的爆发式增长,社交电商如何选择商业模式
13.机器学习基础:数据预处理与特征工程
中断系统需要解决的问题
11.机器学习基础:机器学习的四个分支
【Harmony OS】【ArkUI】ets开发 基础页面布局与数据连接
多肽介导PEG磷脂——靶向功能材料之DSPE-PEG-RGD/TAT/NGR/APRPG
v-on指令:为元素绑定事件
肖sir__自动化面试题
MySQL 出现 The table is full 的解决方法
常见荧光染料修饰多种基团及其激发和发射波长数据一览数据
Record some bugs encountered - when mapstruct and lombok are used at the same time, the problem of data loss when converting entity classes









