Skip to content

Instantly share code, notes, and snippets.

@bitliner
Last active June 16, 2021 12:19
Show Gist options
  • Save bitliner/ff2ccb5f7ae49178a78a19597b15cc14 to your computer and use it in GitHub Desktop.
Save bitliner/ff2ccb5f7ae49178a78a19597b15cc14 to your computer and use it in GitHub Desktop.

curl

Http post with JSON body

curl --header "Content-Type: application/json" \
  --request POST \
  --data '{"username":"xyz"}' \
  http://localhost:3000/api/login

Http with headers

curl -H "User-Agent: ..." \
  https://...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment