Resend request angular 2
问题 In angular 2 app every request to API has header with token, in case token has expired API responds with 401 http code. I have a method to update token, but how I can resend previous request pausing others while a new token is in the process of getting? 回答1: You could extend the Http class for this this way, catch the error using the catch operator of observables: An approach could be to extend the HTTP object to intercept errors: @Injectable() export class CustomHttp extends Http {