Thanks for your comment. In my opinion, the only other option here would be to use HTTP interceptors to achieve this. I couldn't find any other way of doing this with services , events or observables. :(
Please direct me to any blog / post / article to achieve it , if I am missing something here.
If the client is firing the async requests they can track the response right? Be it just one or hundreds all promises can be combined and monitored for completion. As each one completes a message is sent to the tracker. Only 2 things are known, the promise and the resolve.
That's just one extra line of code inside each subscribe or then (100 repetitive lines of code for 100 responses , and I haven't even counted calls which are merged into one observable, what if I want to track each one seperately, like I want to show a different message for each call ), defeats the purpose of the whole post. Sorry but I don't see a solution here .
Hey John Peters,
Thanks for your comment. In my opinion, the only other option here would be to use HTTP interceptors to achieve this. I couldn't find any other way of doing this with services , events or observables. :(
Please direct me to any blog / post / article to achieve it , if I am missing something here.
Thanks . ✌️
If the client is firing the async requests they can track the response right? Be it just one or hundreds all promises can be combined and monitored for completion. As each one completes a message is sent to the tracker. Only 2 things are known, the promise and the resolve.
That's just one extra line of code inside each subscribe or then (100 repetitive lines of code for 100 responses , and I haven't even counted calls which are merged into one observable, what if I want to track each one seperately, like I want to show a different message for each call ), defeats the purpose of the whole post. Sorry but I don't see a solution here .
All work can be refactored ro just one function which sends the request, subscribes and posts a completion message.