当前位置:网站首页>Postman interface test tool
Postman interface test tool
2022-06-10 18:08:00 【llp1110】
Postman- Interface testing tool
1.Postman Introduce
1.Postman What is it?
- Postman Is a super powerful for sending HTTP Requested Testing tools
- do WEB Common tools for page developers and testers
- Create and send any HTTP request (Get/Post/Put/Delete…)
2.Postman Related resources
1. Official website https://www.postman.com/
2. file https://learning.postman.com/docs/getting-started/introduction/
3.Postman install
Specific installation steps
● download Postman Software
Address : https://www.postman.com/downloads/

● install
- Double click to install ( It's simple ), Postman Will not let you choose the installation path , Will be installed directly , Generally installed in System disk .
- Installation successful , There are shortcut icons on the desktop .
2.Postman Quick start
1. Quick start requirements
● requirement : Use Postman towards http://www.baidu.com issue get request , Get back html Format data

2. Quick start - Implementation steps
- To register first Postman An account number : This is simpler , Enter email , Add the account name and password
- Sign in Postman( Data synchronization will be performed after login )

- Get into Postman

3.Postman Complete the simple Controller Layer test
explain : Use Postman , Complete the written UserHandler Method request
The project path of my project configuration is springmvc, So the requested url yes http://localhost:8080/springmvc/ Address of the interface
1.POST request
@PostMapping(value = "/user/buy")
public String buy() {
System.out.println(" Purchase goods ~");
return "success";
}
There are no special parameters for the interface , Yes header Parameters are not required , All direct originations Post The request can be

2.GET request
@RequestMapping(value = "/user/find", params = "bookId=100", method = RequestMethod.GET)
public String search(String bookId) {
System.out.println(" Query books bookId= " + bookId);
return "success";
}
Request mode :GET、 Must pass parameters :bookId And the value must be 100

[email protected] The default support GET/POST request
Here we are @RequestMapping The method of the request is not specified in , The default is to support get and post Requested
@RequestMapping(value = "/user/hi")
public String hi() {
System.out.println("hi");
return "success";
}
GET request

POST request

4. Requests that match multi-layer paths
@RequestMapping(value = "/user/message/**")
public String im() {
System.out.println(" Send a message ");
return "success";
}

5. Request address to get parameters
@RequestMapping(value = "/user/reg/{username}/{userid}")
public String register(@PathVariable("username") String name,
@PathVariable("userid") String id) {
System.out.println(" Parameters received --" + "username= " + name + "--" + "usreid= " + id);
return "success";
}

6.DELETE request
@DeleteMapping(value = "/delete")
public void delete(){
System.out.println(" Delete successful ");
}

边栏推荐
- 云计算搭建全部内容总结,保证可以搭建一个完整的云计算服务器,包括节点安装、实例的分配和网络的配置等内容
- 系统需要把所有文件扫描一遍,并尝试识别视频的封面
- PCA principal component analysis tutorial (origin analysis & drawing, without R language)
- AI 加持实时互动|ZegoAvatar 面部表情随动技术解析
- mmdetection之dataloader构建
- LeetCode 321. Maximum number of splices***
- AOE网关键路径
- Vim常用命令总结
- Some views on the current CIM (bim+gis) industry
- Abbexa AML1 DNA 结合 ELISA 试剂盒说明书
猜你喜欢

安装Linux系统的MySQL,在xshell中遇见的问题

pwnable start

线性移动棋

yml文件配置参数定义字典和列表

True thesis of information system project manager in the first half of 2022

mmdetection之model构建

How will you integrate into the $20trillion "project economy" in five years

一文带你了解J.U.C的FutureTask、Fork/Join框架和BlockingQueue

Linear mobile chess

IIS安装 部署网站
随机推荐
蓝桥杯_糊涂人寄信_递归
LeetCode树经典题目(一)
Summary of vim common commands
mmdetection之dataloader构建
Solve the problem that vs2022 slowly loads a pile of symbols when debugging the program
The development of flutter in digital life and the landing practice of Tianyi cloud disk
Open source project PM how to design official website
一文带你了解J.U.C的FutureTask、Fork/Join框架和BlockingQueue
电商行业转账返款方案分析
yml文件配置参数定义字典和列表
系统需要把所有文件扫描一遍,并尝试识别视频的封面
4. ssh
Force buckle 20 Valid parentheses
训练时添加进度条的库--tqdm
【FAQ】运动健康服务REST API接口使用过程中常见问题和解决方法总结
安装Linux系统的MySQL,在xshell中遇见的问题
IP总结(TCP/IP卷1和卷2)
YML file configuration parameter definition dictionary and list
【AXI】解读AXI协议双向握手机制的原理
关于目前CIM(BIM+GIS)行业的一些看法