Skip to content

Instantly share code, notes, and snippets.

@b1tg
Created November 25, 2018 03:19
Show Gist options
  • Save b1tg/e10ae26caa9961646c843f11788b061e to your computer and use it in GitHub Desktop.
Save b1tg/e10ae26caa9961646c843f11788b061e to your computer and use it in GitHub Desktop.
curl POST json
# 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