–location (-L) |
Follow redirects |
curl -L <URL> |
–proxy (-x) |
Access <URL> via proxy |
curl -x <PROXY>:<PORT> <URL> |
–head (-I) |
Display only headers |
curl -I <URL> |
–user (-u) |
Pass username and password for server authentication |
curl -u <USERNAME:PASSWORD> <URL> |
–form (-F) |
Send first and last name as form data |
curl -F fname=<value> -F lname=<value> <URL> |
–request (-X) |
Post JSON |
curl -H “Content-Type: application/json” -X POST -d ‘{“fname”:”some”,”lname”:”dude”}’ <URL> |
|
Post JSON from “json_file” |
curl -H “Content-Type: application/json” -X POST -d @json_file <URL> |
–insecure (-K) |
Proceed with connection even if considered insecure |
curl -K <URL> |
–cert (-E) |
Use custom SSL certificate |
curl -X GET –cert certificate.pem –key certkey.pem –key-type PEM <URL> |