type
status
date
slug
summary
tags
category
icon
password
PostMan测试接口实现如下功能:
(1)上传文件
(2)导出excel

一、PostMan测试接口实现上传文件

当测试接口需要上传文件时,我们依然可以借助Postman。
1.接口地址填写正确
2.将接口请求方式设置为Post
notion image
3.设置Headers
Content-Type:multipart/form-data
notion image
4.Body选择form-data
5.key右侧下拉选择file,value点击Select Files 选择要上传的文件
notion image
6.点击Send发送请求
notion image

二、PostMan测试接口实现导出excel文件

最近有导出Excel的接口要测试,而且项目加了权限不方便在浏览器直接测试后端接口,于是在postman上测试导出Excel方法,直接点击Send按钮会生成一堆乱码:
notion image
后来折腾了一会,发现Send按钮还有一个下拉选项Send and Download,点击这个问题就解决了:
点击 Send and Download 按钮,
notion image
然后选择Excel文件保存的位置:
notion image
点击保存即可!!!
notion image
 
RocketmqNginx的使用讲解
IT小舟
IT小舟
微信公众号:IT小舟
公告
type
status
date
slug
summary
tags
category
icon
password
notion image
你好,我是小舟。 欢迎来到我的博客,我喜欢运动、阅读、音乐和写作。如果有什么想要交流的,可以加我微信:upcodezhou。再次感谢你的光临!
notion image