RestClient methods to have a configurable timeout #2333
Labels
community-upvoted
enhancement
New feature or request
priority-medium
Not functioning - next quarter if capacity permits
Milestone
Hi,
The
RestClient
class static methods lack timeout support for client-side connection errors like host resolution. The default NodeJS timeout would be around 2-3 minutes, which might be too much.The
http
module already supports timeouts (see theClientRequestArgs
interface), and theAbstractRestClient.request()
could be ehanced to set timeout option either in the.buildOptions()
method, or by calling theclientRequest.setTimeout(N);
after creating one of http/https clients.In addition to that an event listener is needed, similar to the one you have for the
error
event:And the last item would be the
RestClient
which methods need to accept and bypass the timeout option. I believe a static property common for all requests should be fine.Thanks,
Sergei.
The text was updated successfully, but these errors were encountered: