All HTTP API Methods Explained in 2 Minutes
17K views
Apr 22, 2025
Simplifying HTTP API methods
View Video Transcript
0:00
number one is the get method So this is
0:02
used to get data from a server and it
0:05
does not change anything on the server
0:07
For example we can say get/ users/1 23
0:11
and this will get the user the ID of 1 2
0:14
3 and all of their details If you want
0:16
to get all the users that are available
0:19
we can say get/ users without specifying
0:21
the user ID Number two is the post
0:24
method This is used to send data to the
0:26
saver to create something new For
0:29
example we can say post/ users and
0:32
provide the data that we want to create
0:34
In this case the name will be John Smith
0:37
The email will be
0:39
Johnmith.com and we can provide any
0:41
other data that we want So this will
0:43
create a new user with the name John
0:45
Smith and the email that we have
0:47
provided Number three the put method
0:50
This is used to replace existing data
0:53
entirely For example we can say put/
0:57
users/124 and provide the data that we
1:00
want and this data will replace all the
1:02
data of the user that has the ID of 124
1:05
Number four is the patch method This is
1:08
used to update part or all of the data
1:10
So for example we can say patch/
1:14
users/124 and provide the data that we
1:16
want to change In this case we just want
1:18
to change the name from whatever it was
1:21
to John So this will update the user the
1:23
ID of 124 and change their name to John
1:26
Number five delete method This is used
1:29
to remove data from the server For
1:31
example we can say delete/
1:34
users/124 and this would delete the user
1:37
with the ID of 124 with all of their
1:40
details Subscribe for more videos like
1:42
this
#Computers & Electronics
#Internet & Telecom