当前位置:网站首页>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
边栏推荐
猜你喜欢
随机推荐
2022 Henan Mengxin League Game (4): Zhengzhou University of Light Industry E - Sleep Well
数值类型转换02
富瑞宣布战略交易,以简化运营,持续专注于打造领先的独立全服务型全球投行公司
path development介绍
8.电影评论分类:二分类问题
"Obs" start pushing flow failure: the Output. The StartStreamFailed call process
测试人员的价值体现在哪里
链动2+1模式简单,奖励结构丰厚,自主裂变?
OpenFOAM extracts equivalency and calculates area
Shell条件语句判断
接口测试框架实战(一) | Requests 与接口请求构造
肖sir__面试就业课___数据库
JS底层手写
多肽介导PEG磷脂——靶向功能材料之DSPE-PEG-RGD/TAT/NGR/APRPG
自组织是管理者和成员的双向奔赴
Redis缓存雪崩、缓存穿透、缓存击穿
在竞争白热化的电商行业,链动2+1为什么还有企业在用
C#异步和多线程
v-text指令:设置标签内容
我将GuiLite移植到了STM32F4开发板上









