Skip to content

Instantly share code, notes, and snippets.

@cmilfont
Created December 6, 2012 14:53
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 cmilfont/4224990 to your computer and use it in GitHub Desktop.
Save cmilfont/4224990 to your computer and use it in GitHub Desktop.
Curl para logar e pegar token
curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-X POST http://localhost:3000/users/sign_in \
-d "{\"user\" : { \"email\" : \"cmilfont@gmail.com\", \"password\" : \"testes\"}}" \
-c cookie
@cmilfont
Copy link
Author

curl -H 'Content-Type: application/json' -H 'Accept: application/json' -X POST http://localhost:3000/users/sign_in -d "{"user" : { "email" : "admin@grupofortes.com.br", "password" : "testes"}}" -c cookie -v

curl -H 'Content-Type: application/json' -H 'Accept: application/json' -X POST http://localhost:3000/ag/autenticador/login -d "{"user" : { "email" : "admin@grupofortes.com.br", "password" : "testes"}}" -c cookie -v

curl -H 'Content-Type: application/json' -H 'Accept: application/json' -X GET http://localhost:3000/sistemas.json -d "{"auth_token":"Gh1UhcSZHf3VDHphSXPp"}" -c cookie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment