Created
April 26, 2018 19:31
-
-
Save kazagkazag/ccd70734758625e5b24486428d9b7fca to your computer and use it in GitHub Desktop.
This file contains hidden or 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
# fetch articles for user with ID "myUserId" | |
curl --verbose -X GET "http://localhost:4000/users/myUserId/articles" | |
# response: | |
# [{"title":"qui vero quo enim error","content":"...","createdAt":"2018-04-26T05:50:26.130Z"}, ...] | |
# try to register user with valid user name | |
curl --verbose -X POST http://localhost:4000/register -H 'content-type: application/json' -d '{"userName":"valid"}' | |
# response: | |
# ... | |
# < HTTP/1.1 200 OK | |
# try to register user with invalid user name | |
curl --verbose -X POST http://localhost:4000/register -H 'content-type: application/json' -d '{"userName":"invalid"}' | |
# response: | |
# ... | |
# < HTTP/1.1 400 Bad Request | |
# ... | |
# {"message":"Invalid user name."} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment