1
00:00:08,600 --> 00:00:17,980
In this video, we are going to talk about one of the built in browser API called Fetch and for Fetch.

2
00:00:17,990 --> 00:00:21,370
We used to make what is called a HTTP request.

3
00:00:21,380 --> 00:00:26,260
So we need to understand when we say HTTP request, what does it mean?

4
00:00:26,270 --> 00:00:30,190
So let's explain that before using the fetch API.

5
00:00:30,200 --> 00:00:32,150
So here we go.

6
00:00:32,509 --> 00:00:37,790
So let's say that we want to develop new application in this way.

7
00:00:37,790 --> 00:00:41,330
We need a data source before get into that.

8
00:00:41,330 --> 00:00:45,710
We are going to use what is called JavaScript, HTML and CSS.

9
00:00:45,710 --> 00:00:51,980
That is a front end and now we need a back end where we are going to get that data.

10
00:00:52,250 --> 00:01:00,740
So let's say that we have an API or a backend server built by Facebook and for Facebook they give us

11
00:01:00,740 --> 00:01:04,040
some data about the users or latest posts.

12
00:01:04,040 --> 00:01:08,030
And apart from Facebook, we can have Google servers.

13
00:01:08,030 --> 00:01:11,030
And for Google servers they also have what is called YouTube.

14
00:01:11,030 --> 00:01:14,660
Let's say that we want to build our custom YouTube channel.

15
00:01:14,690 --> 00:01:20,660
So let's say that we want to develop an application for trending videos on YouTube.

16
00:01:20,780 --> 00:01:25,790
We can get that one done by making what is called the HTTP request.

17
00:01:25,790 --> 00:01:33,920
So HTTP request simply means that it's a way of getting data from one server into your application and

18
00:01:33,920 --> 00:01:35,930
you can have service like Instagram.

19
00:01:35,930 --> 00:01:43,430
And let's say that these applications were built using the back end technology like Node.js and MongoDB.

20
00:01:43,460 --> 00:01:44,900
Let's take in that way.

21
00:01:45,200 --> 00:01:50,960
So now we have our back end server that provides all the data that we need.

22
00:01:50,960 --> 00:01:56,900
So now it's time for the front end to be able to consume the data inside here.

23
00:01:57,050 --> 00:02:04,400
And this is what we call making HTTP requests, and this is possible using what is called the API,

24
00:02:04,430 --> 00:02:13,280
meaning that Facebook or Google will expose part of their resources as an API where any developer can

25
00:02:13,280 --> 00:02:14,480
have access to.

26
00:02:14,480 --> 00:02:19,670
And for that API, it can be a free API or paid API.

27
00:02:19,670 --> 00:02:24,410
So you pay based on the consumption of the data you're going to use.

28
00:02:24,410 --> 00:02:32,270
So in a nutshell, HTTP request simply means that a way of getting data from external server into your

29
00:02:32,270 --> 00:02:33,230
application.

30
00:02:33,230 --> 00:02:36,350
And here is the question how is it possible?

31
00:02:36,410 --> 00:02:41,960
It is possible because we are going to use an API called fetch API.

32
00:02:42,110 --> 00:02:51,110
The first API is an HTTP client would help us to make a request to a server and fetch data into our

33
00:02:51,110 --> 00:02:52,040
application.

34
00:02:52,040 --> 00:02:59,240
And we also have third party HTTP client like Axios and I like Axios more than fetch.

35
00:02:59,240 --> 00:03:05,090
But for the meantime, let me show you how we are going to use fetch to make an HTTP request to face

36
00:03:05,090 --> 00:03:05,870
some data.

37
00:03:05,900 --> 00:03:13,880
And that's what I use to build the post application use page to be able to make a request to an API

38
00:03:13,910 --> 00:03:18,020
to retrieve any data I want into my application.

39
00:03:18,170 --> 00:03:25,940
So in the next video we are going to make use of the Fetch API to be able to create a block application.

40
00:03:25,940 --> 00:03:28,580
Let's get into that in the next video.

