I'm trying to get the following HTTP POST containing XML to work using RCurl package in R:
curl -X POST 'https://api.example.com/resource.xml' -d 'From=value'
-d 'To=value' -d 'Body=value' -u username:password
I have no problems running the above code using command line, but when I try to use postForm in the RCurl package, I run into problems.
Here is my attempt using postForm in RCurl:
postForm('https://api.example.com/resource.xml',
userpwd="username:password",From='value',To='value',Body='value')
It seems supplying the username/password is the main issue. I can pass the params without an issue.