Skip to content

Instantly share code, notes, and snippets.

@harshalbhakta
Created September 16, 2013 18:09
Show Gist options
  • Select an option

  • Save harshalbhakta/6584313 to your computer and use it in GitHub Desktop.

Select an option

Save harshalbhakta/6584313 to your computer and use it in GitHub Desktop.
# Authenticate:
curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-X POST http://localhost:3000/users/sign_in \
-d "{'user' : { 'email' : 'test@example.com', 'password' : 'password'}}" \
-c cookie
# Show:
curl -H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-X GET http://localhost:3000/pages/1.xml \
-b cookie
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment