I am working on a plugin that uses the HTTPClient and a POST request. I am trying to lower the timeout to 1000ms so it ‘fails’ quickly and I can move on in the code to a different method. (The POST will timeout if the device is powered off.)
If I let it run long enough, it does timeout after around 20 seconds. However, if I adjust the timeout, it does not seem to make a difference:
var http = new HTTPClient(); var httpConfig = { timeout: 1000 }; var resp = http.post("http://<Address>", httpConfig);
Of note, I can seem to be able to adjust the timeout for a GET request.