Skip to content

Instantly share code, notes, and snippets.

@delvedor
Created July 12, 2018 16:28
Show Gist options
  • Save delvedor/b56a385d94179064468bd908339c35ff to your computer and use it in GitHub Desktop.
Save delvedor/b56a385d94179064468bd908339c35ff to your computer and use it in GitHub Desktop.
### testing the login service
curl \
-H "Content-Type: application/json" \
-X POST -d '{"username":"john","password":"secret"}' \
http://localhost:3000/signup
### testing the post service
# create a new moo
curl \
-H "Content-Type: application/json" \
-H "Authorization: Basic am9objpzZWNyZXQ=" \
-X POST -d '{"text":"Hello world!"}' \
http://localhost:3000/post/create
# get a moo by id
curl \
-H "Authorization: Basic am9objpzZWNyZXQ=" \
-X GET \
http://localhost:3000/post/wnlTvrhoRhysbuXP-YGrOw-0
### testing the user service
# get all moos of a user
curl \
-H "Authorization: Basic am9objpzZWNyZXQ=" \
-X GET \
http://localhost:3000/user/john/post
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment