0

I am a bit puzzled because I can not get this to work from within R.

I want to execute the following Curl request from within R using RCurl:

curl -T 'temp.csv' -H 'Content-Type: text/csv' https://api.crowdflower.c.json?key={APIKEY}

That is, I want to transfer the file "temp.csv" to the server. This curl command itself works really well, however, I would like to send it from within R without having to use

system("curl -T 'temp.csv' -H 'Content-Type: text/csv' https://api.crowdflower.c.json?key={APIKEY}")

I have played around with the fileUpload() function, but it does not work.

Do you have any clues or hints for me how I can get this to work with RCurl? Maybe it is not really designed to be able to handle this as I see that most people use it only to automate forms or to scrape websites using R.

Thanks a lot for your help,

best Thiemo

devmag
  • 233
  • 3
  • 5
  • Sorry, I had not read the question properly. Then I fear I cannot help you. But to get help from someone else it might be useful to further specify "it does not work.", what error you get etc. And take a look [here](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example). – ROLO Dec 06 '13 at 18:46
  • Can you show us what you've attempted with `fileUpload`? – Thomas Dec 08 '13 at 20:08

0 Answers0