Created
July 12, 2018 16:28
-
-
Save delvedor/b56a385d94179064468bd908339c35ff to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### 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