Skip to content

Instantly share code, notes, and snippets.

@dacr
Last active April 2, 2023 10: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 dacr/d0d86a633e786dc303a867d6e87e8c56 to your computer and use it in GitHub Desktop.
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/b7d76cce7b71564e200887e302f7e98bae0aa1f8
## summary : post json using curl
## keywords : bash, json, curl, @testable
## publish : gist, corporate
## authors : David Crosson
## license : Apache NON-AI License Version 2.0 (https://raw.githubusercontent.com/non-ai-licenses/non-ai-licenses/main/NON-AI-APACHE2)
## 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