Skip to content

Instantly share code, notes, and snippets.

@dacr
Last active February 3, 2026 20:20
Show Gist options
  • Select an option

  • Save dacr/d0d86a633e786dc303a867d6e87e8c56 to your computer and use it in GitHub Desktop.

Select an option

Save dacr/d0d86a633e786dc303a867d6e87e8c56 to your computer and use it in GitHub Desktop.
post json using curl / published by https://github.com/dacr/code-examples-manager #c33b631a-b3d7-498b-ada1-9ab92bc4f281/1e2c8c9d8e1a2af957377df4002162ebb5990fa0
## summary : post json using curl
## keywords : bash, json, curl, @testable
## publish : gist, corporate
## authors : David Crosson
## license : Apache License Version 2.0 (https://www.apache.org/licenses/LICENSE-2.0.txt)
## id : c33b631a-b3d7-498b-ada1-9ab92bc4f281
## created-on : 2020-10-09T17:24:01+02:00
## managed-by : https://github.com/dacr/code-examples-manager
## run-with : sh $file
# -d @file.json to send the content of a file
curl -d '{"message":"hello"}' -H "Content-Type: application/json" https://httpbin.org/post
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment