当前位置:网站首页>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 ");
}

边栏推荐
- js锚点定位可以扩展很多功能
- 蓝桥杯_糊涂人寄信_递归
- mmcv之Registry类解读
- well! One new star, please look over | elder martial brother and elder martial sister say
- Red vertical left side menu navigation code
- Numpy - record
- Record of cmake and GCC installation
- Leetcode 321. Nombre maximum de raccords
- Solve the problem that vs2022 slowly loads a pile of symbols when debugging the program
- Chunk extend: hit training lab13
猜你喜欢

The relationship between trees, forests and binary trees

XML&Xpath解析

One of the Taobao short video pit avoidance Guide Series -- thoroughly understand Taobao short video

如何定位游戏发热问题

Numpy np set_ Usage of printoptions () -- control output mode

Nacos configuration management

Swin_Transformer源码解读

线性移动棋

Penguin E-sports stops, and tiger teeth are hard to walk

LeetCode树经典题目(一)
随机推荐
正斜杠“/”、反斜杠“\、”转义字符“\”、文件路径分割符傻傻记不清楚
堆利用之chunk extend: HITCON tranining lab13
搭建在线帮助中心,轻松帮助客户解决问题
玩轉Pytorch的Function類
基于注解和反射生成xml
PMP考生,深圳2022年6月PMP考试地点有这些
Wireshark学习笔记(一)常用功能案例和技巧
XML&Xpath解析
Container containing the most water
【AXI】解读AXI协议双向握手机制的原理
Feign based remote call
IP总结(TCP/IP卷1和卷2)
掌握高性能计算前,我们先了解一下它的历史
The latest good article | interpretable confrontation defense based on causal inference
Flutter在数字生活的发展与天翼云盘落地实践
踩坑了,BigDecimal 使用不当,造成P0事故!
Chunk extend: hit training lab13
The development of flutter in digital life and the landing practice of Tianyi cloud disk
淘宝短视频避坑指南系列之一--彻底了解淘宝短视频
High number_ Chapter 6 infinite series__ Absolute convergence_ Conditional convergence