Rxjava disposable with Fire and Forget API call

299 Views Asked by At

A Fire and Forget API call is made and its disposable is added to compositeDisposable. We are not handling any results. We just need to update the server on an action. After the call is made and in OnDestroy of the fragment, we are disposing the composite disposable. Will the API call be a success or failure (on the server-side) if it was disposed before the call was completed (received in subscribe method) on the app side?

1

There are 1 best solutions below

0
On BEST ANSWER

In short, Yes, The API call will be completed if it is taking a very short time.

If the API is giving you a larger data set then the stream will be interrupted which in turn cancels the network call.

Hope you are using the Completable Observable.