Curl understanding
suppose you are developer and building your own website ,while building that you should test your api and test the responses, for that you use either postman or other platform but its not convienece and not fast way to test apis, so here you use curl.
what is curl?
so basically curl is an command line interface tool use to sending http/https request to server and receiving the response ,curl also support many protocalls like ftp,scp,smtp etc.
its widely use by developer and system administrators for testing api , fetching web responses.
Why programmers need cURL
so the curl tool provides directly communicate with network ,developer directly comunicate with server using command line interface , so here no need to any other third party software ,UI to communicate with server .
some resons to need Curl:
test api without building frontend
to debuging Network and Server issues → so here browesr hiding many detail like request heaader,TLS handshakes,Authentication flow , Curl shows everythings.
curls gives oppurtunities to direct work with http methods→ such as get ,post,put ,delete etc
to sending custom headers and tokens.
making request using Curl :
so for that use have to make sure the curl is install in your pc.
chek version :

then make request : in my case i reqested to my college project website

lets understand when i send request to my site
DNS Resolution
firstly when request fires its find “A“ record of server which is the IP address:
Example:216.24.57.251
Connect to the Server (TCP + HTTPS) :
then after finding ip my pc connect to server using tcp 3 handshak ,then connection start on port 443HTTP Request
now the my pc send the request to server for data,
method: get ,headers.etc

Server Response
server response statuse code 200,response headers ,and response body

sending get request to api:

conclusion:
curl is powerfull tool and easy to use all the hidden detail of network related things like dns resoltion are clearly saw in cmd .
Common beginner mistakes in cURL include using the wrong HTTP method, missing headers, invalid JSON format, forgetting authorization tokens, and not checking HTTP status codes.