Curl
netcat is a bit complicated to use
curl
is installed by default on most systems
curl
You can also send http requests with the curl command:
$ curl -s http://substack.net
issues a GET request to substack.net and prints the body to sdtout You don't get back the headers only the content.
To see just the headers, use -I
:
$ curl -sI http://substack.net
The -s
gets rid of annoying progress output.
curl: issuing a POST
The default is to send a GET request.
Use -X
to set the http verb (POST) and -d
to set
form parameters (for each form element):
$ curl -X POST http://localhost:5000 -d title=whatever \
-d date=1421044443 -d body='beep boop!'