一、postman参考链接
1、官方文档:https://learning.postman.com/docs/postman/launching-postman/introduction/
2、官网:https://www.postman.com/
3、Postman 使用方法详解(大痴小乙的博文):https://blog.csdn.net/fxbin123/article/details/80428216
二、自己使用的记录
1、用postman抓高德数据
流程:页面分析XHR,copy->copy as a cURL(cmd)->postman里file菜单import,Paste Raw Text
要抓取的数据来源于很多页面,并且需要输出结果。可以用collection,并配合postman tests脚本做处理,最后可以从postman console里查看和复制。
// yz.forEach(e1 => {
// e1.forEach(e2=>{
// console.log(e2.name+":"+e2.longitude+":"+e2.latitude);
// })
// });
var data=JSON.parse(responseBody);
data.data.poi_list.forEach(function(e2){
console.log(e2.name+":"+e2.longitude+":"+e2.latitude);
});
2、Newman
可以通过Newman在windows powershell里运行postman的collection。
流程:postman右键collection导出json,shell里定位路径,运行newman run *.json