Skip to content

Instantly share code, notes, and snippets.

@herry13
Last active December 19, 2015 08:49
Show Gist options
  • Select an option

  • Save herry13/5928811 to your computer and use it in GitHub Desktop.

Select an option

Save herry13/5928811 to your computer and use it in GitHub Desktop.
cURL example commands
# send data which is kept in a file through HTTP Post method
curl -i -X POST -F "json=@data.json" localhost:8080/save
# send data through HTTP Post method
curl -i -X POST -d json='{"key":"value"}' localhost:8080/save
# send binary file through HTTP Post method
curl -i -X POST -F data=@filepath localhost:8080/save
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment