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
# Clear the cookies | |
$ rm cookies.txt | |
# Create a user | |
$ curl -v -b cookies.txt -c cookies.txt -X POST 127.0.0.1:8080/api/v0.1/employees -d '{"employeeId":666, "password":"hello"}' | |
HTTP/1.1 201 Created | |
# Try querying without auth | |
$ curl -v -b cookies.txt -c cookies.txt -X GET 127.0.0.1:8080/api/v0.1/employees | |
HTTP/1.1 401 Unauthorized |