There is a situation where if my API call fails due timeout, I have to retry by increasing the timeout by 20 seconds. All the examples of retrofit I searched show static timeout. Something like in following How to set timeout in Retrofit library?
or ask to put timeout in @Headers field. But this is not suitable in my case. onFailure(), I want to
- increase the timeout by 20 seconds for retry attempt and then
- reset to original timeout.