Follow up to 5 redirects

Follow up to 5 redirects and show every request and response in detail.

curl -Lv --max-redirs 5 https://example.com

tool
curl21 commands
tags
curldebug

More curl commands

  • curl -sSL -o /tmp/result.json https://api.example.com/data

    Download quietly and follow redirects, but still show errors.

  • curl -o /dev/null -sS -w 'ttfb: %{time_starttransfer}s\ntotal: %{time_total}s\n' https://example.com

    Measure TTFB and the total request time.

  • curl -sI https://example.com

    Print HTTP response headers without the body.

  • curl -F 'file=@./report.pdf' -F 'user=alice' https://upload.example.com/api

    Upload a file as multipart/form-data with extra form fields.

  • curl --http2 -sI https://example.com | grep -i 'http\|alt-svc'

    Ask for HTTP/2 and check the protocol and alt-svc in the response headers.

all 21 curl commands