Jimmy Alvarez

09/16/2019, 3:05 PM
Hey guys, hope yo're doing good. I'm curious about how do you achieve a retry functionality on a webService request using retrofit and RX. ``` createBackendClient(context, URL_A).flatMap { it.doRequest(T) } .onErrorResumeNext(createBackendClient(context, URL_B).flatMap { it.doRequest(T) }) ```In my case, I have to retry on a different endpoint
Example: URL_B
by when firts attempt fails. But, what about if I have to retry to the same URL, do I have to re-subscribe to the same Observable on each request or there is an more option to solve this problem?