Skip to content

下载发票文件

调用【获取发票下载信息】接口后,调用该接口下载发票文件。该接口不支持签名和验签。 官方文档 官方文档

js
const 
axios
=
require
('axios')
const {
createWriteStream
} =
require
('fs')
axios
.get('/invoicing/fapiao/fapiao-file', {
baseURL
,
params
,
responseType
,
}) .then( ({
data
,
headers
: {
'sm3-digest':
sm3DigestString
}, }) => {
data
.pipe(
createWriteStream
('./downloaded.pdf'))
} )

Released under the MIT License. (SITEMAP)