1
00:00:01,610 --> 00:00:08,410
In this lecture, we are going to talk about how we can actually intercept a network in terms of our

2
00:00:08,480 --> 00:00:09,500
particular data.

3
00:00:09,530 --> 00:00:14,240
If you have on an API and we want to show that particular data, it's more like a mocking data that

4
00:00:14,240 --> 00:00:18,510
we can do for our network request.

5
00:00:18,770 --> 00:00:25,370
So Muqdadiyah kind of very, very famous, where you can actually intercept a real network and you can

6
00:00:25,370 --> 00:00:29,960
create your own injector data, which you can use like a mark and stub and stuff.

7
00:00:30,110 --> 00:00:35,360
I mean, I'm not going to go into that deep level of markings and STUBING, but what I'm trying to do

8
00:00:35,360 --> 00:00:38,450
right now is going to be applicable for mocking and disturbing as well.

9
00:00:38,840 --> 00:00:45,110
So what are going to do is we are going to make use of a fake Jasen server, which is going to have

10
00:00:45,110 --> 00:00:47,660
like a small API server running.

11
00:00:47,840 --> 00:00:53,570
And that particular observer is actually going to be responsible for performing such an action for us.

12
00:00:53,870 --> 00:01:05,780
So if I just go to the Google Chrome, probably and if I search for fake, um, Jasen server, you can

13
00:01:05,780 --> 00:01:08,830
see that there is something called us type called fakirs on server.

14
00:01:08,840 --> 00:01:15,350
So this is going to be like a full jasen server, which is going to be like a fake, by the way, which

15
00:01:15,350 --> 00:01:18,400
you can use for building your JS on servers and stuff.

16
00:01:18,440 --> 00:01:20,810
The installation of the figures on server is super easy.

17
00:01:21,080 --> 00:01:25,450
All you got to do is you're going to do this npm install hyphen G Artisan's over.

18
00:01:25,670 --> 00:01:26,560
That's it.

19
00:01:26,570 --> 00:01:33,610
If you do that, you will have a jasen server for you and then you can create a DVD on file with the

20
00:01:33,640 --> 00:01:35,210
supposed commands and stuff.

21
00:01:35,210 --> 00:01:40,550
And if you run the speaker JS So we're using this particular command like Jayson's over hyphenation.

22
00:01:40,550 --> 00:01:46,820
Watch our DVR, John, and you can access this server using this particular you are URL and the port

23
00:01:46,820 --> 00:01:47,410
and stuff.

24
00:01:47,720 --> 00:01:48,960
This is super easy.

25
00:01:49,370 --> 00:01:52,730
So what I'm going to do is I'm going to go to our study

26
00:01:55,160 --> 00:02:09,110
Udemy Playwrite Section six over here, and then I'm just going to do a code maybe an hour that I'm

27
00:02:09,110 --> 00:02:12,350
going to call this as data.

28
00:02:13,010 --> 00:02:17,390
And within this data, I'm just going to go to the state.

29
00:02:17,400 --> 00:02:20,480
I probably am going to create a file.

30
00:02:20,480 --> 00:02:23,840
I'm going to call this as probably debate autism.

31
00:02:24,050 --> 00:02:28,160
And this debate or design is going to hold this data, which as you can see or hear.

32
00:02:28,160 --> 00:02:30,320
So I'm just going to copy paste the same data, probably.

33
00:02:30,320 --> 00:02:35,450
But you can change whatever data that you really like and you can access the data from the part that

34
00:02:35,450 --> 00:02:39,760
you're going to be specifying just for the sake of time and just for the simplicity as well.

35
00:02:39,950 --> 00:02:42,560
I'm just going to go with whatever is there already.

36
00:02:42,890 --> 00:02:43,250
Right?

37
00:02:43,490 --> 00:02:45,110
So I'm just going to stay with this one.

38
00:02:45,320 --> 00:02:59,000
And now if I just go here and if I just go to the JS on server hyphen, hyphen Waj of Dot, I mean probably

39
00:02:59,000 --> 00:02:59,840
deep down Jasen.

40
00:03:00,110 --> 00:03:04,670
And if I had run, you can see that the data on server is currently up and running.

41
00:03:04,700 --> 00:03:10,020
So this is the super simple command that you can do to run a super simple design server.

42
00:03:10,400 --> 00:03:16,400
So if I tried to access this station server, just consider this, this is going to be a real jasen

43
00:03:16,400 --> 00:03:19,910
server which is running, but you need to intercept this particular network request.

44
00:03:19,920 --> 00:03:20,240
Yeah.

45
00:03:20,630 --> 00:03:24,350
So I'm going to see that this network request is currently running.

46
00:03:24,350 --> 00:03:29,180
And if I try to access the post, you can see that the network request post is coming pretty quickly.

47
00:03:29,900 --> 00:03:33,350
And this is the data on server title and authoress type of code, something like that.

48
00:03:33,530 --> 00:03:35,720
This is all coming from this place, by the way.

49
00:03:35,840 --> 00:03:43,760
So if I just change the title to probably playwright and author is going to be like Katic if I save

50
00:03:43,760 --> 00:03:50,150
this and if I try to access this, you can see the title Playwrite and other discothèque coming in so

51
00:03:50,150 --> 00:03:54,710
instantly because it is setting the database the way basically from this particular JS on file.

52
00:03:54,800 --> 00:03:55,490
That's it.

53
00:03:55,490 --> 00:03:56,330
That simple.

54
00:03:56,330 --> 00:03:56,630
It is.

55
00:03:56,960 --> 00:04:02,630
And now we need to intercept this particular network request and we need to see how we can actually

56
00:04:02,630 --> 00:04:04,490
do that using playwrite.
