当前位置:网站首页>Postman download and use tutorial
Postman download and use tutorial
2022-07-28 00:52:00 【Nancheng. Nancheng】
Postman Introduce
Postman yes google A powerful web page development and debugging HTTP request , And be able to run test cases Chrome plug-in unit .( Now the latest version is an independent app) Its main functions include :
Simulate all kinds of HTTP requests
From the usual GET、POST To RESTful Of PUT 、 DELETE … wait . You can even send files 、 Send out extra header.
Collection function ( Test set )
Collection yes requests Set , When you finish a test , You can take this request Save to a specific Collection Inside , In this way , The next time you do the same test , There's no need to re-enter . And one collection Can contain more than one request, If we put one request Think of it as a test case, that collection Can be seen as a test suite. adopt collection Classification of , We can well classify and test what the software provides API. and Collection just so so Import or Share Come out , Let everyone in the team share the Collection.
Humanized Response Arrangement
Usually when testing with other tools ,response It's usually plain text raw, But if it is JSON , It's stuffed into a whole line JSON. It's a barrier to reading , and Postman Can target response The format of the content is automatically beautified . JSON、 XML or HTML Will be organized into a format that we can read
install
Official download address
Pay attention to the corresponding operating system ( The default is download OS Operating system app)
After downloading and installing , open postman It shows that we need to log in
Don't panic at this time , At the bottom, there is a line of small characters that can be used directly by skipping login 
Use (GET、POST、PUT etc. )
We are sending a request You need four parts when you need to :url、method、headers、body.
url Is the request address
method It's the way of request Such as get、post、delete、put etc.
headers Is used to store header information , Such as token
body It is mainly used when there is data to upload , Such as post The submitted data will be placed in body in , When uploading files, the file data stream will also be placed in body in
open postman Create a request
You can see request We can edit all the four parts we need here 
method There are also many methods

stay URL After we write the address in the column below params Edit parameters in ,postman It will automatically help us write parameters URL in , Again URL If there are parameters ,postman It will also help us automatically load the line surface params in 
Click on send Send a request to view the returned response Information 
Next, let's see how to use post Send new data request
josn Request for adding format parameters 

Upload files , Click the select File button 
close token
First we need to get token, First use postman Initiate a login request , At this time, the back end will return us token stay response in . It's about the way it looks , Of course, depending on your project needs, there may be more other information .
Get this token Then we need to put this token Set to environment variable 
// take token Extract and coexist in variables
var val = postman.getResponseHeader("token");
// Set the above variables as environment variables
pm.environment.set("token",val);
Below you need to use token In the request of , Add... To the request header token
边栏推荐
- 加拿大法院认定孟晚舟“双重犯罪”成立,引渡程序将继续进行!
- From the second floor to the third floor
- 基本初等函数
- 至少42名员工感染新冠病毒!诺基亚宣布关闭印度电信设备工厂
- Ali Er Mian: why do we need to separate databases and tables?
- 蓝桥杯单片机第十一届国赛程序设计试题
- 【Meetup预告】OpenMLDB+OneFlow:链接特征工程到模型训练,加速机器学习模型开发
- startUMl
- [CruiseControl]Build Result JSP
- LeetCode_ Bit operation_ Medium_ 137. Number II that appears only once
猜你喜欢

Recurrence of fastjson historical vulnerabilities

头补零和尾补零对FFT输出结果的影响

How to smoothly go online after MySQL table splitting?

Smart convenience store takes you to unlock the future technology shopping experience

融云 IM & RTC 能力上新盘点

一文读懂CMake

红队大杀器 Behinder_v4.0(冰蝎4.0)
![[CruiseControl]Build Result JSP](/img/80/11c2b539c217ecd6ba55668d3e71e9.png)
[CruiseControl]Build Result JSP

从第二层到第三层
![[must read for new products] valuation analysis of Meishi technology, distributed audio-visual products and Solutions](/img/40/bf3e992e363dbd6600805775058310.jpg)
[must read for new products] valuation analysis of Meishi technology, distributed audio-visual products and Solutions
随机推荐
The program design questions of the 11th national competition of Bluebridge cup single chip microcomputer
When Jerry made a phone call, recording to SD card /u disk was not enough [article]
半导体测试设备市场现状:国产化率仍不足10%!
数据可视化-《白蛇2:青蛇劫起》(3)
҈ straight ҈ Broadcast ҈ Pre ҈ Report ҈ |҈ In hot summer, let's cross the high temperature and "bake" with nono!
Network equipment hard core technology insider firewall and security gateway chapter (VI) security double repair under the law
leetcode:1997. 访问完所有房间的第一天【跳跃dp】
Redis-事务与乐观锁
Fastjson历史漏洞复现
Jerry, if you turn on Bluetooth again, one for two. When the mobile phone is connected to the prototype, it will appear and cannot be connected [chapter]
Leetcode 415. string addition and 43. string multiplication
网络设备硬核技术内幕 防火墙与安全网关篇 (八) 虚拟化神器 (中)
mysql数据库的基本操作(一)-——基于数据库
Jerry caused other messages to accumulate in the message pool [article]
Network device hard core technology insider firewall and security gateway (10)
阿里二面:为什么要分库分表?
【Meetup预告】OpenMLDB+OneFlow:链接特征工程到模型训练,加速机器学习模型开发
In July, a software testing engineer came to the company. He looked like a hairy boy. He didn't expect to be the new generation of roll King
Selection of FFT sampling frequency and sampling points
Map set