So What is Curl ??
Curl is a cli tool for making http from terminal it allows us to use other protocols such as FTP
CURL - Client URL
Simple Get Request Using Curl
curl http://www.name.domain
by default it will log the output or if you want to save response as a file use -o
argument
Example
curl -o output.html http://www.name.domain
Also
curl http://www.name.domain > output.html
For Specifying URL use
curl -s http://www.name.domain
For POST method
curl -d '{"name":"John","surname":"Doe"}'\http://www.name.domain
The -X flag specifies a custom request method to use when communicating with the HTTP server. By default, the GET method is used unless some other method is specified.
Setting User Agent
curl --user-agent "Mozilla/4.73 [en] (X11; U; Linux 2.2.0 i686)" http://www.name.domain
Top comments (0)