我正在构建一个节点模块,它应该在节点承诺处理后返回一个值。
// module
module.exports.get_data = function(input){
var promise = fn1();
promise
.then((res) => {
// process res
return res; // return processed value from get_data function
})
}
Run Code Online (Sandbox Code Playgroud)
我怎样才能完成这件事?
我尝试向 DocuSign 发出请求以获取文档列表,以便我可以遍历 URI 列表。
我向以下人员提出请求:
https://account-d.docusign.com/accounts/{accountId}/envelopes/{envelopeId}/documents
headers: { json: true, headers: { 授权: 'Bearer'+token }, followAllRedirects: true }
该请求返回的 HTML 页面可读性较差。状态为 200 正常
可能是什么问题?