Angular Tutorials: Intercepting all Network/XHR calls in the Angular app | Mocking API response

preview_player
Показать описание
Hey Guys,
Watch this video if you all want to intercept all the network/XHR calls within your app. We could have done this via the HTTP interceptor that angular provides but that will not intercept the widget calls which internally go through. Hence, we have used javascript to intercept all possible calls and return a mock json which would be present in the UI repo itself. This is the second episode of a multi-part series where in I will be going over a plethora of topics related to Angular. Stay Tuned! Do Like, Share and Subscribe if you enjoyed the content and found it helpful for your projects. Cheers!

Download the source code here:

#angular #tutorials #interview

Subscribe for more videos:

If you want to crack Angular Interviews, do watch:

Video Chapters
-----
Intro: (0:00)
Creating a mock response (json): (2:00)
Creating the interceptor to intercept all XHR calls via the app: (2:50)
Verifying the mock response in the brower network: (7:19)
Conclusion and Demo: (8:00)

Let’s connect:

#angular #tutorials #interview #course #learn #questions #english #advanced #concepts #network #intercept #apicalls #mock #response #XHR #widget #third-party #javascript #interceptor
Рекомендации по теме
Комментарии
Автор

Hi Sir, Hope you are doing great. Same thing I want to do in java but it's not working I'm using NetworkInterceptor class object and it's method to route to local JSon file and take content from there and display on the screen. Could you please help me with that.

UdayPatre
welcome to shbcf.ru