Closed SudoDios closed 3 years ago
They are on by default but you can turn them off with Unirest.config().automaticRetries(false).
By default Unirest will automatically retry up to 5 times those methods that fail with a transport exception while the HTTP request is still being transmitted to the target server (i.e. the request has not been fully transmitted to the server).
Thanks ❤️
Do I just have to do this before each request ?
no, it's a configuration, you do it once for the instance (or the primary static instance if you are just using Unirest.config()
. Don't do it on each request because it rebuilds the engine which is costly.
Thank you. I will follow you.
Looks like this is resolved. closing the issue
hi. how to set retryOnConnectionFailure?