Create a gist now

Instantly share code, notes, and snippets.

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
Owner

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