-
-
Save b1tg/e10ae26caa9961646c843f11788b061e to your computer and use it in GitHub Desktop.
curl POST json
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
# method 0 | |
vim body.json # write json | |
curl -H "Content-Type: application/json" --data @body.json http://localhost:8080/ui/webapp/conf | |
# method 1 | |
curl --header "Content-Type: application/json" \ | |
--request POST \ | |
--data '{"username":"xyz","password":"xyz"}' \ | |
http://localhost:3000/api/login |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment