Currently we are using httpClient object in JS as described in
I am trying to figure out if there is a way to set a timeout on the http connection. I am referring to abandoning the connection if the connect/send/receive takes more than x number of milliseconds.
I understand that httpClient is async, but still we are concerned about the number of (async) threads this will create if the Target of the httpClient is slow in response and the load it will create on the MP.
The API, which is using the httpClient in JS, is heavily used and we want to make sure that a slow connection does not result in a high number of (async) threads waiting for the target of the httpClient to respond.
I see there is a waitForComplete(x) on the object httpClient returns, but it defeats the purpose of the (async), if we wait to set the timeout and kill the http connection thread.
Is there a way to set a timeout on the httpClient Request or the exchange object it creates?