尝试发送带有请求的 base64 pdf 字符串,但我似乎无法弄清楚请求的正确结构。在此先感谢您的帮助!
var dpdf = pdfvar.toString('base64');
var options = {
method: 'POST',
body: dpdf,
url: FILEPICKER_URL,
headers: [
{
name: 'content-type',
value: 'application/pdf'
}
]
};
request(options, function(err, httpResponse, body){
console.log('body: ', body);
console.log('code ', httpResponse.statusCode)
});