curl is used in command lines or scripts to transfer data.
curl is a tool to transfer data from or to a server, using one of the supported protocols (DICT, FILE, FTP, FTPS, GOPHER, HTTP, HTTPS, IMAP, IMAPS, LDAP, LDAPS, MQTT, POP3, POP3S, RTMP, RTMPS, RTSP, SCP, SFTP, SMB, SMBS, SMTP, SMTPS, TELNET and TFTP). The command is designed to work without user interaction.
- Git Bash
- tiny-curl
curl --include https://jsonplaceholder.typicode.com/posts/1
curl --head https://jsonplaceholder.typicode.com/posts/1
curl -o test.txt https://jsonplaceholder.typicode.com/posts/1
curl -O http://i.imgur.com/QRlAg0b.png
curl -O --limit-rate 1000B http://i.imgur.com/QRlAg0b.png
curl -O test.txt http://wajeeha.com/test.txt -A "Mozilla"
curl -d "title=Hello&body=Hello World" https://jsonplaceholder.typicode.com/posts
curl -X PUT -d "title=Hello&body=Hello World" https://jsonplaceholder.typicode.com/posts/1
curl -X DELETE https://jsonplaceholder.typicode.com/posts/1
curl -u Wajeeha:mypassword https://jsonplaceholder.typicode.com/posts/1
- curl http://google.com
- curl -L http://google.com
curl -u ftpuser:ftppass -O ftp://x.x.x.x/public_html/sopmefile.php
curl -u test@site:credential! -T hello.txt ftp://ftp.test.com
curl -u test@site:credential! -O ftp://ftp.test.com/hello.txt