public
Last active

Curl para logar e pegar token

  • Download Gist
gistfile1.sh
Shell
1 2 3 4 5 6 7 8 9
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

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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.