Тайм-аут запроса мыла Node.js - PullRequest
0 голосов
/ 21 июня 2019

Рассматривая документацию этого модуля 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 })
})
...