N
N
newdancer2017-08-24 22:16:28
Android
newdancer, 2017-08-24 22:16:28

How to repeat request in retrofit2?

How to repeat request in retrofit2? It happens sometimes that the application sends requests one after another and sometimes for some requests no response comes at all (even with an error). Nothing just comes. How to repeat the request if it was not made?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
lomikman, 2017-08-31
@lomikman

Make reftrofit api return observable. You can then use the RxJava operator - Retry reactivex.io/documentation/operators/retry.html

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question