cURL Cheatsheet

Nice things you can do with cURL # Resolve a hostname with a given ip curl http://iix.se --resolve iix.se:80:206.189.18.126 # Run many queries in a loop (either for looping or load testing) curl 'http://localhost:8080/oauth/login?[1-10]' -d '{ "username": "[email protected]", "password": "secret" }' -vvv -H "Content-Type: application/json" # Light load testing an endpoint (Z=parallell, -s/-o removes output, -w sets new output) curl -Z -so /dev/null -w "%{time_total} %{http_code}\n" 'https://acme.system.com/api/endpoint?[1-20]'

May 25, 2020  |  🏷️curl