WEBVTT

00:03.790 --> 00:05.220
Hey, did everyone are they sure?

00:05.230 --> 00:06.940
And welcome to another video.

00:06.970 --> 00:11.410
In this video, we're going to talk about something that I kind of rushed through it, and some of you

00:11.410 --> 00:15.760
probably already know it, but I expect that you know nothing and that's where we are going to start.

00:15.910 --> 00:18.430
In case you didn't noticed, I wrote a get here.

00:18.430 --> 00:20.860
So what is this get and what it's going to do?

00:20.890 --> 00:23.350
Let's go ahead and talk more about this one.

00:23.650 --> 00:27.790
Now, whenever you make a Web request, there are types of Web requests that you make.

00:27.820 --> 00:32.890
Usually we really don't see or talk much about it because it's kind of obvious for us.

00:32.890 --> 00:35.890
But as a developer, that becomes a little bit more to us.

00:36.100 --> 00:41.410
Whenever you make a request to ask something from the Google, Google looks into the database and give

00:41.410 --> 00:42.100
it to you.

00:42.130 --> 00:48.190
That kind of request is known for the browser to make in most of the cases, but whenever you actually

00:48.190 --> 00:52.600
write in your email and password and you send it to Google and that validates it, that's a different

00:52.600 --> 00:58.240
kind of request because you are sending some data for the database itself and you're trying to just

00:58.240 --> 01:04.090
kind of put that data permanently, not in the case of log in, but definitely at the case of registration.

01:04.090 --> 01:07.510
So these kinds of things are made up of different web requests.

01:07.510 --> 01:12.820
Now, there are not too many of them for you to remember, but we call them as web request and they

01:12.820 --> 01:18.610
play a very important role at the time of building the web application, whether it's just rest API

01:18.610 --> 01:23.080
or something else, they are really important and good news is there are majorly four of them that we

01:23.080 --> 01:27.370
are going to talk, everybody talks, but there are a little bit more and I'll explain more of them.

01:27.460 --> 01:33.190
Simply putting get post, put and delete and no, there is no color code associated with them.

01:33.190 --> 01:37.060
Usually delete is marked as red, but there is no color code associated with them.

01:37.060 --> 01:39.520
I just put it because I felt these are good ones.

01:39.520 --> 01:45.370
Let's talk about them one by one and they are really simple get is for requesting the information.

01:45.430 --> 01:50.080
Let's just say you are onto a shopping website, you are searching for a term and it gives you a result

01:50.110 --> 01:50.340
back.

01:50.350 --> 01:57.490
These are all get operations and when you slide at just your pricing or maybe your filter by request

01:57.490 --> 02:01.840
or filter by rating, these all are get requests because you are not putting any information onto the

02:01.840 --> 02:03.700
database, you are just asking for it.

02:03.700 --> 02:09.610
And for all these kinds of asking information, we just go for request information and get type of request.

02:10.330 --> 02:14.150
In the case of post, it is usually add to database.

02:14.170 --> 02:19.330
Now what happens in this case, whenever there is information that you are sending something that probably

02:19.330 --> 02:25.980
is going to just add it onto the database itself, then definitely 100% it's supposed to request.

02:25.990 --> 02:30.880
Now, if a sensitive information is also traveling something like your password or something, it is

02:30.880 --> 02:35.890
recommended that web developers use a post request because in the post the data doesn't travel like

02:35.890 --> 02:39.120
in the URL or some place, which is really not that much safe.

02:39.130 --> 02:44.200
So in the case, whenever there is a database involved and you want to put some information or to store

02:44.230 --> 02:49.180
that permanently, then for such persistence information post request is being used.

02:49.270 --> 02:54.280
Another one is put whenever there is a database information which is already there, but you want to

02:54.280 --> 02:55.270
update it.

02:55.390 --> 02:57.700
That's where the put request comes in.

02:57.700 --> 03:01.540
For example, you want to change your username, you want to change your name, you want to change your

03:01.540 --> 03:02.320
photos.

03:02.380 --> 03:07.300
There is already something in the database and that's where the put request comes in.

03:07.390 --> 03:13.660
And finally, last but not the least, the delete request, which obviously is type of request delete

03:13.660 --> 03:15.550
and you delete something from the database.

03:15.550 --> 03:20.140
Now as a user, nobody cares about what kind of request they are sending as a web developer.

03:20.140 --> 03:22.450
Yes, we do care a lot about it now.

03:22.450 --> 03:23.170
Definitely not.

03:23.170 --> 03:28.750
These are the only ones, but these are the majorly being used in every single tech giant major of majority

03:28.750 --> 03:29.290
of them.

03:29.290 --> 03:35.320
But there is a link here to read more, and this is the official MD documentation that you can click

03:35.320 --> 03:38.170
from this web link and I'll give you all the presentation and everything.

03:38.170 --> 03:38.950
Don't do worry.

03:38.950 --> 03:41.840
So what you can see is majority.

03:41.860 --> 03:43.180
These kinds of requests are there.

03:43.180 --> 03:44.350
So there is a get request.

03:44.350 --> 03:47.170
Yes, of course there is a head request, but we don't use it that much.

03:47.170 --> 03:48.910
Yes, in the course we will be using it.

03:48.910 --> 03:50.500
But you don't have to worry too much on that.

03:50.500 --> 03:51.850
You automatically get that.

03:51.850 --> 03:52.870
You don't have to worry.

03:52.870 --> 03:57.280
Then there is a post put and delete that we talked about, but there is a connect, there is option

03:57.280 --> 03:58.960
trace and patch and all of that.

03:58.990 --> 04:00.270
You don't have to worry.

04:00.310 --> 04:05.470
Majority of the time you won't be seeing much of the people using it until unless you are building extremely

04:05.470 --> 04:06.640
complex application.

04:06.640 --> 04:11.110
And by the time you'll be having information about all four of them, it would be easier for you to

04:11.110 --> 04:12.460
understand the rest of them.

04:12.550 --> 04:12.870
Okay.

04:12.910 --> 04:17.920
So now that you are all done and you know the reason why I wrote a get here, because all of this is

04:17.920 --> 04:19.030
asking information.

04:19.030 --> 04:21.550
None of them is adding information on the database.

04:21.550 --> 04:25.840
We don't have a database yet, but this is all that you should know about the request.

04:25.840 --> 04:27.850
Read a little bit more on the documentation.

04:27.850 --> 04:29.200
Even if you don't understand it.

04:29.200 --> 04:32.170
Just glimpsing through over it is always a good idea.

04:32.170 --> 04:34.480
Let's go ahead and catch up in the next video.
