send data using curl from STDIN
curl
code:sh
// from stdin
cat data.json | curl -H "Content-Type: application/json" -X POST -d @- http://api
cat data.json | curl -H "Content-Type: application/json" -X POST -d "$(</dev/stdin)" http://api
// from file
curl -H "Content-Type: application/json" -d @data.json http://api
https://stackoverflow.com/questions/12583930/use-pipe-for-curl-data