curl http://example.com
# when -d is used it defaults to POST curl -d 'username=user&password=pass' http://example.com/register
# defaults to 'application/x-www-form-urlencoded' curl -H 'Content-Type: application/json" -d '{"username":"user","password":"pass"}' http://example.com/register
# defaults to returns just the response body curl -i http://example.com/register
curl <--head | -I> <IP:PORT>
curl -L <URL>
curl -s <URL> -L -o /dev/null -w "%{http_code}"
curl <URL> | json_pp
Last updated 9 months ago
Was this helpful?