curl で json post する

文字列

curl -X POST -H "Content-Type: application/json" -d '{"foo":"foobar", "id":"123"}' localhost:8000/foobar/

JSONファイル(@つけるだけ)

curl -X POST -H "Content-Type: application/json" localhost:8000/foobar/ -d @sample.json