I'm trying to pass the cat output to curl:
cat
$ cat file | curl --data '{"title":"mytitle","input":"-"}' http://api
But input is literally a -.
input
-
I spent a while trying to figure this out and got it working with the following:
cat data.json | curl -H "Content-Type: application/json" -X POST --data-binary @- http://api
2.1m questions
2.1m answers
60 comments
57.0k users