Skip to content

Instantly share code, notes, and snippets.

@frenchbread
Last active June 18, 2017 23:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frenchbread/f1661cbf86db5724559bbf7f2caf7565 to your computer and use it in GitHub Desktop.
Save frenchbread/f1661cbf86db5724559bbf7f2caf7565 to your computer and use it in GitHub Desktop.
curl POST request with JSON data example
curl -H "Content-Type: application/json" -X POST -d '{"username":"xyz","password":"xyz"}' http://localhost:3000/api/login
curl -XGET 'http://127.0.0.1:8000/api/some' -H 'Authorization: JWT <some_token>'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment