Skip to content

Instantly share code, notes, and snippets.

@francisco-rojas
Created May 19, 2015 17:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save francisco-rojas/54380d87d8837d042a7c to your computer and use it in GitHub Desktop.
Save francisco-rojas/54380d87d8837d042a7c to your computer and use it in GitHub Desktop.
CURL recipies

Using curl to log in setting the cookie and extracting the CSRF token:

curl http://localhost:3000/users/sign_in --cookie-jar cookie | grep csrf

curl http://localhost:3000/users/sign_in -L --data "user[email]=user@users.com&user[password]=my_password&authenticity_token=oy4J2HVPezOc5JrTXMyaSjeCDHhN%2Bv5yVzlvShm%2FjFc%3D" --cookie cookie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment