GET is default, using -d or -F makes it a POST, -I generates a HEAD and -T sends a PUT.
curl -O README.md download and save with orginal name or -o (lowercase o) the result will be saved in the filename provided
curl -u ftpuser:ftppass -O ftp://ftp_server/public_html/xss.php download files from FTP servers
curl -X POST -d '{"updated_field1":"updated_value1"}' http://example.com
curl -X POST curl -d @test.json http://example.com
curl -F "image=@/home/user1/Desktop/test.jpg"
-k: not check SSL certificates
-L: follow redirects
-v: get verbose output
-i: response headers
curl --mail-from blah@test.com --mail-rcpt foo@test.com smtp://mailserver.com
Or:
curl --url 'smtps://smtp.gmail.com:465' --ssl-reqd \
--mail-from 'username@gmail.com' --mail-rcpt 'john@example.com' \
--upload-file mail.txt --user 'username@gmail.com:password' --insecure