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

Jon-Yngve Bakke

You can do something like this:

.flatMap(new Function<DataResponse, ObservableSource<DataModel>>() {
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>() {
public void accept(@NonNull DataModel model) throws Exception {

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

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