Cheatsheet Pages / curl Cheatsheet
How to log in once and reuse the session with curl — cookie jars
The site needs a login before the interesting pages work: save the cookies after logging in, then send them with every later request.
curl -c cookies.txt -d "user=ezra&pass=s3cret" https://example.com/login
curl -b cookies.txt https://example.com/dashboard
# -b "name=value" also works for a one-off cookie without a file
Good to know
-c writes the cookie jar after the request; -b reads it back. A one-off -b "name=value" also works without a file.
