What is cURL ?
cURL is a command line used to check
Status of a Website
To make http request to website
As you make a request using cURL you will get response from website’s Server.
What is Server ?
The computer which serves the information as a response to client, who made a request .
If client asked about status of website Server will provide the response.
If client has made any http request, Server will give a response on that particular request.
Why we need cURL ?
Developers use cURL for the following purpose
API testing
Devs test there API response by sending a request in JSON format (usually) and check if their API calls are working or not.
HTTP request
by using cURL one can make HTTP requests like
GET → Fetch data
POST → Send data
DELETE → Delete a data
PUT → Update a data
Status
To check the status of websites or their API calls .
How can we use it ?
The main part of blog starts from here, as we will discuss the practical part of cURL after understanding why we need it.
The syntax for using cURL is
curl [options] URL
here [options] are used as flags and URL is the url of website you want to make a request using curl
Checking Status of google.com
As we have discussed, we can check status of any website or API. So we will begin by checking status of Google.com
Request -
curl -I https://www.google.com
Response -
HTTP/2 200
content-type: text/html; charset=ISO-8859-1
content-security-policy-report-only: object-src 'none';base-uri 'self';script-src 'nonce-4ANujxQTgQRXAZo6KePOuQ' 'strict-dynamic' 'report-sample' 'unsafe-eval' 'unsafe-inline' https: http:;report-uri https://csp.withgoogle.com/csp/gws/other-hp
accept-ch: Sec-CH-Prefers-Color-Scheme
p3p: CP="This is not a P3P policy! See g.co/p3phelp for more info."
date: Wed, 21 Jan 2026 06:37:42 GMT
server: gws
x-xss-protection: 0
x-frame-options: SAMEORIGIN
expires: Wed, 21 Jan 2026 06:37:42 GMT
cache-control: private
set-cookie: AEC=AaJma5t0T-pWLsbdSFITXx-JfFUAm2o0aV11QZw320wl9hdAg4PNKAJ_c3s; expires=Mon, 20-Jul-2026 06:37:42 GMT; path=/; domain=.google.com; Secure; HttpOnly; SameSite=lax
set-cookie: NID=528=AM2U9XroG4NTYL2ioPq6liPbjD0Il_bscRQihjn8o4OT_ZWdspggzWN7cj7u-vGOaLivDMtxGUNMijsIwBoERFnKSX14NwS-edA0lN6KBJoL7REMlaf1_a9rSoB7_64FbCFvrEygzrQ8d1XtYiNA6RFCxDCx8sSKqUO8nvUW3XAN6F4fPkUkBfxjEVQ4vli2iFnLXXib-YREzHfyYJFOpSDUpVbm0Q; expires=Thu, 23-Jul-2026 06:37:42 GMT; path=/; domain=.google.com; HttpOnly
set-cookie: __Secure-BUCKET=CLcD; expires=Mon, 20-Jul-2026 06:37:42 GMT; path=/; domain=.google.com; Secure; HttpOnly
alt-svc: h3=":443"; ma=2592000,h3-29=":443"; ma=2592000
Making our first request using cURL
GET request
Syntax-
curl URL
To make a GET request we use this
curl https://www.google.com
Try it once on your terminal, you will get all the Html Css and Js of this website (which is very huge)
You can also try this API to see the weather and temperature of a city
Request -
curl https://wttr.in/Goa?format=%C+%t
Response -
Sunny +31°C
Post request
Syntax -
curl -X POST url
During Post request you have to mention what data you are sending which is done by using -d Flag, and to mention the type of data you mention Header by using -H Flag
Here is example of sending a data in JSON format as POST request
For this example we would use this API https://jsonplaceholder.typicode.com/posts
Request -
curl -X POST https://jsonplaceholder.typicode.com/posts \
-H "Content-Type: application/json" \
-d '{
"title": "Learning cURL for first time",
"body": "Sending a POST request",
"userId": 10
}'
Response -
{
"title": "Learning cURL for first time",
"body": "Sending a POST request",
"userId": 10,
"id": 101
}
As this is our introduction and we are beginner in this topic for now its enough for us to know till these and we can start using cURL in our projects for better development.

