当前位置:网站首页>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
边栏推荐
猜你喜欢
Test drive: project management module - curd development project
【Harmony OS】【ARK UI】ETS 上下文基本操作
常见荧光染料修饰多种基团及其激发和发射波长数据一览数据
记录一些遇见的bug——mapstruct和lombok同时使用时,转换实体类时数据丢失问题
DDL操作数据库、表、列
DOM破环和两个实验的复现
UV 裂解的生物素-PEG2-叠氮|CAS:1192802-98-4生物素接头
IDEC和泉触摸屏维修HG2F-SS22V HG4F软件通信分析
传统企业如何转型社交电商,泰山众筹的玩法有哪些?
打破传统电商格局,新型社交电商到底有什么优点?
随机推荐
接口测试框架实战(二)| 接口请求断言
表的创建、修改与删除
4.深度学习的几何解释与梯度的优化
MySQL 删除表数据,重置自增 id 为 0 的两个方式
easyswoole的mysqli 事务怎么写
1.一个神经网络示例
【Harmony OS】【ARK UI】轻量级数据存储
正则表达式与绕过案例
【Harmony OS】【ArkUI】ets开发 图形与动画绘制
Redis连接不上的报错解决方案汇总
【生物素叠氮化物|cas:908007-17-0】价格_厂家
Record some bugs encountered - when mapstruct and lombok are used at the same time, the problem of data loss when converting entity classes
肖sir ——自动化讲解
接口测试 Mock 实战(二) | 结合 jq 完成批量化的手工 Mock
修饰生物素DIAZO-生物素-PEG3-DBCO|重氮-生物素-三聚乙二醇-二苯基环辛炔
9.新闻分类:多分类问题
接口测试实战| GET/POST 请求区别详解
汇编题答案
肖sir__面试就业课___数据库
mysql bool blind