The curl command with the -X or --request POST option is used to send a POST request to a server. Let's say www.example.com contains index.php with following markup.
<?php echo $_POST['foo']; ?>
The following curl command would display "bar".
curl -X POST http://www.example.com/index.php --data "foo=bar" . . . bar
The --url option is used to define the URL being requested. This option is typically not needed, thus the following commands both display the contents of the index.html page from the www.example.com web server.
curl -X POST http://www.example.com/index.html curl -X POST --url http://www.example.com/index.html