Passing binary data to curl without using a @file
You can pass data into curl via STDIN like so:
echo -e '...data...\n' | curl -X POST --data-binary @- http://foo.com
The @-
tells curl
to pull in from STDIN.
To pipe binary data to curl (for example):
echo -e '\x03\xF1' | curl -X POST --data-binary @- http://foo.com