Node.js Soap请求超时

时间:2019-06-21 12:50:37

标签: soap soap-client node-soap

查看此模块https://www.npmjs.com/package/soap的文档,它们似乎支持超时功能:

Client.method(args, callback, options) - call method on the SOAP service.

The options object is optional and is passed to the request-module. Interesting properties might be:

timeout: Timeout in milliseconds

当我在选项中提供它时,显然它不起作用:

soap.createClient(this.url, function (err, client) {
  client.SomeMethod({ request: {} }, (err, result, raw) => {
    console.log('...')
  }, { timeout: 5000 })
})

0 个答案:

没有答案