Skip to content
curl

Cookies

Send, save, and reuse cookies.

#cookie#session

Code

curl
# Send a cookie
curl -b "session=abc123" https://example.com/

# Save cookies from a response
curl -c cookies.txt https://example.com/login -d "user=alice"

# Reuse saved cookies
curl -b cookies.txt https://example.com/dashboard

# Save and send in one flow (cookie jar)
curl -b cookies.txt -c cookies.txt https://example.com/profile