GET Method
In this lesson, we will understand how to use the HTTP GET method.
We'll cover the following
What is the GET method?
The GET
method is used by the client to fetch the data from the server.
Let’s make a GET
request for the given URL.
curl -X GET https://reqres.in/api/users/2
- The command above will show the response data from the server in the form of a
JSON
Note: By default,
curl
requests the URL using theGET
method. To request the specific URL using thePOST
,DELETE
orPUT
methods, we have to use the-X
right after the curl command and specify the name of a particular method.
Get hands-on with 1400+ tech skills courses.