curl -i -H "Accept: application/json" http://192.168.0.165/persons/person/1
curl -X POST -u admin:admin http://example.com/myconfigs/status -Hcontent-type:application/xml -d @/home/user/file.xml
curl -X POST -u admin:admin http://example.com/myconfigs/status -d "param1=value1¶m2=value2"
curl -i -H "Accept: application/json" -X PUT -d "phone=1-800-999-9999" http://192.168.0.165/persons/person/1
curl -i -H "Accept: application/json" -H "X-HTTP-Method-Override: PUT" -X POST -d "phone=1-800-999-9999" http://192.168.0.165/persons/person/1
curl -i -H "Accept: application/json" -X DELETE http://192.168.0.165/persons/person/1
curl -i -H "Accept: application/json" -H "X-HTTP-Method-Override: DELETE" -X POST http://192.168.0.3:8090/persons/person/1
curl -i -H "Accept: application/json" "http://192.168.0.165/persons?firstName=james&lastName=wallis"
curl -b "name=value" http://example.com
curl -b mycookies.txt http://example.com
Setting HTTP Headers
curl -H "Accept: application/xml" -H "Content-Type: application/xml" http://example.com
curl -i -H "Accept: application/json" -X POST -d "firstName=james" http://192.168.0.165/persons/person
curl -H "Content-Type: application/json" -X POST -d '{"username":"xyz","password":"xyz"}' http://localhost:3000/api/login
curl example.com
curl example.com > file.html
curl -o file.html example.com
curl -O libiconv-1.14.tar.gz http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.10.tar.gz \
-O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.12.tar.gz \
-O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.13.tar.gz
curl -L example.com
curl -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.10.tar.gz
# cancel it with Ctrl + C
curl -C - -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.10.tar.gz
View complete request and response headers
curl -v example.com
View only response headers
curl -I example.com
curl -x http://proxyserver:proxyport --proxy-user user:password -L http://example.com
curl -k https://example.com
curl -A "USER AGENT" http://example.com
curl --limit-rate 100k -O http://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.10.tar.gz
curl ftp://example.com/mydirectory/myfile.zip --user username:password -o myfile.zip
List FTP directory structure
curl ftp://example.com --user username:password
curl -T myfile.zip ftp://example.com/mydirectory/ --user username:password
curl ftp://example.com/ -X 'DELE myfile.zip' --user username:password
curl --url "smtps://smtp.example.com:465" --ssl-reqd \
--mail-from "[email protected] " --mail-rcpt "[email protected] " \
--upload-file mailcontent.txt --user "[email protected] :password" \
--insecure
curl --cacert my-ca.crt https://example.com
Baixar arquivo dependendo da data de alteração
curl -z 3-Jan-14 http://example.com/myfile.gz