I was thinking to use this plugin as a general message display for all my API responses. I have a common file which handles all the http request. Can you pl. share some light on how to achieve this?
I am attaching my code snippet below, the place I want to use this plugin issomewhere above - this.logout();
// Interceptor for response
public interceptAfter(response: InterceptedResponse): InterceptedResponse {
if (response.response.status === 401) {
this.logout();
}
// Do whatever with response: get info or edit it
this.loaderService.showLoader.next(false);
return response;
}
Hi @akserg,
I was thinking to use this plugin as a general message display for all my API responses. I have a common file which handles all the http request. Can you pl. share some light on how to achieve this?
I am attaching my code snippet below, the place I want to use this plugin issomewhere above -
this.logout();
Thanks, Abhishek Jain