request / request-promise

The simplified HTTP request client 'request' with Promise support. Powered by Bluebird.
ISC License
4.77k stars 297 forks source link

WeChat Mini Program can't support 'promise' grammar #363

Open wwddd66 opened 3 years ago

wwddd66 commented 3 years ago

I want to use this code in my WeChat Mini Program, but it can't support 'promise' grammar. And I can't understand the Instructions of readme, so how to return the 'data' after calling the cloud function? 我想在我的微信小程序中使用此代码,但它不支持“promise”语法。 而且我不明白readme的说明,那么调用云函数后如何返回“data”? const client = new OcrClient(clientConfig); const params = { "ImageUrl": "https://xxx.jpg" }; client.BusinessCardOCR(params).then( (data) => { console.log(data); }, (err) => { console.error("error", err); }