For HTTP Post request, sometimes I need to attach a file to the body. Currently, it is relatively easy to collapse a small xml file down to one string and provide that (just inconvenient). However, for the Bulk API loading into Salesforce (which is 10x faster than standard loading with Salesforce steps), sometimes I need to reference/send a CSV file.
For example, I might like to include an xml file (login.xml), as in this example:
curl https://login.salesforce.com/services/Soap/u/23.0 -H "Content-Type: text/xml;
charset=UTF-8" -H "SOAPAction: login" -d @login.xml
Or I might like to include a csv data file (data.csv), as in this example:
curl https://instance.salesforce.com/services/async/23.0/job/jobId/batch -H
"X-SFDC-Session: sessionId" -H "Content-Type: text/csv; charset=UTF-8" --data-binary