
cURL describes itself as:
command line tool and library for transferring data with URLs
cURL is a multipurpose networking tool which has lots of useful usecases.
| Command | Description |
|---|---|
curl http://lwlx.xyz |
GET request with cURL |
curl http://lwlx.xyz -v |
Verbose GET request with cURL |
curl http://admin:password@lwlx.xyz/ -vvv |
cURL Basic Auth login |
curl -u admin:password http://lwlx.xyz/ -vvv |
Alternate cURL Basic Auth login |
curl -u admin:password -L http://lwlx.xyz/ |
cURL Basic Auth login, follow redirection |
curl -u admin:password 'http://lwlx.xyz/search.php?port_code=us' |
cURL GET request with parameter |
curl -d 'username=user&password=pass' -L http://lwlx.xyz/login.php |
POST request with cURL |
curl -d 'username=user&password=pass' -L http://lwlx.xyz/login.php -v |
Debugging with cURL |
curl -d 'username=user&password=pass' -L --cookie-jar /dev/null http://lwlx.xyz/login.php -v |
Cookie usage with cURL |
curl -d 'username=user&password=pass' -L --cookie-jar cookies.txt http://lwlx.xyz/login.php |
cURL with cookie file |
curl -H 'Content-Type: application/json' -d '{ "username" : "user", "password" : "pass" }' |
cURL specify content type |
curl -X OPTIONS http://lwlx.xyz/ -vv |
cURL OPTIONS request |
curl -X PUT -d @test.txt http://lwlx.xyz/test.txt -vv |
File upload with cURL |
curl -X DELETE http://lwlx.xyz/test.txt -vv |
DELETE method with cURL |