-
0 votesanswersviews
Messenger发送API错误“参数”错误“:{”message“:”(#100)对于字段'messages':user_id是必需的“
我有Send API的问题 . 我试图使用POSTMAN,cURL将消息发布到我的Messenger帐户 . 它与POSTMAN或cURL一起正常工作 . 但是,我已经构建了Node.js来发送消息 . 错误是“参数user_id是必需的” . 我不知道如何解决这个问题 . 因为在文档中,没有user_id字段 . const body = { "recipient": {... -
0 votesanswersviews
RequestError:错误:读取ECONNRESET nodejs
我尝试使用nba.com api,但是给我错误 . “RequestError:错误:在Request.plumbing.callback上读取新的RequestError(c:\ Users \ Omer \ Desktop \ game \ node_modules \ request-promise-core \ lib \ errors.js:14:15)的ECONNRESET(c: \... -
0 votesanswersviews
如何模拟React组件单元测试的request-promise-native?
包装:Jest,Enzyme,(和Nock不起作用) . 我有以下React组件: import ... const request = require('request-promise-native'); class SomeSearchContainer extends Component { constructor(props) { super(props); th... -
0 votesanswersviews
单元测试请求 - 承诺,promise()不是函数
我试图使用 request-promise 对sinon / mocha进行单元测试 . 我附上 .promise() 以允许访问所有Bluebird承诺方法 . 根据 request-promise 自述文件: rp(...).promise() or e.g. rp.head(...).promise() which returns the underlying promise so you ...