Created
May 8, 2017 13:46
-
-
Save pedroxs/4ecef2ca53212cef56b6bc827b235e8b to your computer and use it in GitHub Desktop.
easily generate authenticated resty header config for specified url
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
# easily generate authenticated resty header config for specified url | |
export _url=http://localhost:8080 | |
resty $_url -H "Content-Type: application/json" -H "Accept: application/json" -H "$(curl -s $_url/api/authenticate -d '{"username":"admin","password":"admin","rememberMe":true}' -H 'Content-Type: application/json;charset=UTF-8' | jq '"Authorization: Bearer " + .id_token' -r)" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment