Skip to content

Instantly share code, notes, and snippets.

@FruitieX
Created July 6, 2017 11:36
Show Gist options
  • Select an option

  • Save FruitieX/cd4a0605c682ed73d2c5922723532e23 to your computer and use it in GitHub Desktop.

Select an option

Save FruitieX/cd4a0605c682ed73d2c5922723532e23 to your computer and use it in GitHub Desktop.
TOKEN=$(http POST localhost:3001/admin/users/authenticate email="foo@bar.com" password="foobar" | jq .token | tr -d '"')
CHILD_TOKEN=$(http POST localhost:3001/app/children Authorization:$TOKEN name=asdf | jq .token | tr -d '"')
FEEDBACK_ID=$(http POST localhost:3001/app/feedback Authorization:$CHILD_TOKEN | jq .id | tr -d '"')
http POST localhost:3001/app/content Authorization:$CHILD_TOKEN feedbackId=$FEEDBACK_ID questions:='[{"question": "Hello world?", "answer": "Hello!"}]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment