Currently my code this by nesting observables inside each other...
makeRequest() {
return this.http.get().map((response: Response) => {
return this.http.get(response.doSomething());
}
}
When I need to use it, I subscribe to them both using nesting as well...
I'm fairly sure this isn't the correct way and right now I need a way to do something along the lines of this:
-> make request -> check reply -> if reply indicates token is outdated -> get new token and do the request again -> else pass the results on
What would be the recommended way to achieve this?
Many Thanks,