The correct way to retry api request,when network fail.
Hi,amitshekhariitbhu
While calling api request,Sometime network fail.So i want to recall current request .Could you tell me what correct way to retry current request.This is my code which use to recall current request.Thank so much
@Override
public void upload(final VideoRequest request) {
getMvpView().showUploading();
getCompositeDisposable().add(getDataManager()
.doUploadVideo(request)
........
}, new Consumer
The best way will be by using retry operator of RxJava. Refer this link
Thank for your good support ! @amitshekhariitbhu