Add method to be executed at the end of rest call similar to onBeforeSend()
Closed this issue · 1 comments
masterdany88 commented
I create Ui locker- an simple animation on component when I do request call:
.onBeforeSend(uiLocker::start)
then after the call I need to call it twice:
.onSuccess(s -> uiLocker.stop())
.onFailed(f -> uiLocker.stop())
it would be greate to have one dedicated method for that, like: onAfterSend();
If I do not have special case for fail action it would be enought.
Using global interceptors is not considered, as I need dedicated component to attach animation on it.
vegegoku commented
you can now use onComplete(()->{})
after onSuccess
or onFailed
, the onComplete
will be called wither the request was success or failed.