Created
February 6, 2018 22:01
-
-
Save brunokrebs/6aa582dc85b789cf2ab402f6507bfc07 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
# issue a POST request to get a token | |
curl -X POST -H 'Content-Type: application/json' -d '{ | |
username: "mario", | |
password: "secret" | |
}' http://localhost:63939/api/token | |
# replace xxx.yyy.zzz with the token retrieved in the previous command | |
JWT="xxx.yyy.zzz" | |
# use the token to retrieve books | |
curl -H 'Authorization: Bearer '$JWT http://localhost:63939/api/books |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment