I\'m trying to pass the cat
output to curl:
$ cat file | curl --data \'{\"title\":\"mytitle\",\"input\":\"-\"}\' http://api
Bu
If you want to type/paste the data without escaping or polluting your bash history then, you can use this
cat | curl -H 'Content-Type: application/json' http://api -d @-
Which drops you into cat
where you can input the data, directly, e.g. Shift + Insert in your terminal. You finish with a newline and a Ctrl + D which signals to cat
that you're done. That data is then passed to curl, and you have a reusable history entry.