Request and Response Interceptors in JS
Deepa Chaurasia

Deepa Chaurasia @deepachaurasia1

About: Javascript and Angular Developer I post about Angular You can go to my github page for Javascript notes (Interview Preparation)

Location:
Faridabad,HARYANA
Joined:
Oct 8, 2021

Request and Response Interceptors in JS

Publish Date: May 27 '23
0 1

Interceptors work as a wall between client and server.

Whenever a request is sent from client to server we can do all kind of processing like changing header,or any operation that can be done in interceptor.

After that interceptor will carry forward the request to the server

Similarly in response interceptor we can check whether the server is sending right response,will check status code if user is authorized or not and then we can do different type of actions as per our requirement and return back those response to client

Comments 1 total

Add comment