【发布时间】:2019-07-20 14:23:10
【问题描述】:
当我向 API 发出请求时,它会返回一个 pdf 文件(如果我从浏览器访问 URI,它会自动下载文件)。波纹管代码显示一个带有正确页码的空白 pdf 文件。
rp("URI")
.then(data =>{
res.contentType("application/pdf")
res.send(data)
})
.catch(e =>{
console.log(e)
})
【问题讨论】:
标签: node.js api express request