Is it possible to use curl and post binary data without passing in a file name? For example, you can post a form using binary via --data-binary:
curl -X POST --data-binary @myfile.bin http://foo.com
However, this requires that a file exists. I was hoping to be able to log HTTP calls (such as to rest services) as the text of the curl command to reproduce the request. (this greatly assists debugging these services, for example)
However, logging curl commands that reference a file would not be useful, so I was hoping I could actually log the raw binary data, presumably base64 encoded, and yet still allow you to copy and paste the logged curl command and execute it.
So, is it possible to use curl and post binary data without referencing a file? If so, how would that work? What would an example look like?