When ever api takes more than 30 seconds to give response i want to stop the loader and simply show Retry button on page.
And when user clicks on that button i want to call same API.
This whole above procedure i want to implement in my whole project so i want this to be common function and UI.
Can anyone help me to acheive this globally. So i need not to write the same logic in each and every page.
If possible i want to edit my interceptor such that if API doesn’t responds in 30 sec then it shows the Retry button in component/page. Now when from the component Retry button is pressed the same API gets called again.
Note: API should be called again only on the press of button and hence we can’t use the retry method of rxjs.
Let me know if any rxjs elements can help to achieve this