如何从 Postman Response 下载附件 [英] How to download attachment from Postman Response
本文介绍了如何从 Postman Response 下载附件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个 API,它发送具有以下标头的响应:
I have a API which sends response having following header:
Headers(8)
Test Results(1/1)
Status:200 OK
Time:5890 ms
Size:1.24 MB
Access-Control-Allow-Origin →*
Cache-Control →no-cache
Content-Disposition →attachment; filename=Report.csv
Content-Length →1298149
Content-Type →text/csv
Date →Fri, 22 Jun 2018 08:50:05 GMT
Expires →-1
Pragma →no-cache
我想下载附件'Report.Csv'
I want to download the attachment file 'Report.Csv'
谁能建议我如何通过脚本或新手来做
Can anyone suggest How can I do it via script or newman
推荐答案
如果您从 Postman 应用程序内发送请求,您可以发送和下载"响应.
If you're sending a request from within the Postman app, you can "Send and download" the response.
如果您尝试通过脚本,这里是有关通过运行本地服务器写入本地文件系统的教程,或如何使用纽曼做类似的事情.
If you're trying to do it by script, here's a tutorial about writing to your local file system by running a local server, or how to use Newman to do something similar.
这篇关于如何从 Postman Response 下载附件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文