I have this curl command that I can call in bash
curl -X POST -H 'Content-Type: text/csv' --data-binary @data/data.csv https://some.url.com/invocations > data/churn_scored.jsonl
which posts a CSV file to the API endpoint and I redirect the results into a .jsonl
file.
I can't find where I can specify a data file to POST to the endpoint like using curl's @
.
What's the way to achieve the CURL post using R's curl package (or any other package)? The redirection of output I can figure out in another way.