I'm trying to call REST API asynchronously in a for loop using XMLHttpRequest module. I'm making 400 requests in 1 loop, with a wait time of 1 sec after every 100 requests. This works fine on clientside JavaScript. However, when I run on NodeJS using the same module (it's not natively available, I had to download from npmjs) , I'm getting this error after about 230 requests. Any idea if there is another module that I can use to better handle this bulk API requests?
Error: connect ETIMEDOUT at TCPConnectWrap.afterConnect [as oncomplete]