Janishar Ali OK, then I guess we have to change the web server or find another way to submit it.
Jon-Yngve Bakke
1

Jon-Yngve Bakke

You can do something like this:

getDataManager()
.doDataFetchApiCall(request)
.flatMap(new Function<DataResponse, ObservableSource<DataModel>>() {
@Override
public ObservableSource<DataModel> apply(
@NonNull DataResponse response) throws Exception {
// return the observable that saves the data in to the db
return mDbHelper.saveDataResponseInDb(response);
}
})
.subscribe(new Consumer<DataModel>() {
@Override
public void accept(@NonNull DataModel model) throws Exception {

}
}, new Consumer<Throwable>() {
@Override
public void accept(@NonNull Throwable throwable) throws Exception {
// handle error
}
});
Show your support

Clapping shows how much you appreciated Janishar Ali’s story.