Entering edit mode
Aaron Wolen
▴
20
@aaron-wolen-3682
Last seen 10.1 years ago
I'd like to access an API from within R but I'm not sure how to do so.
The
API uses HTTP and supports both POST and PUT methods. I'm able to
access it
successfully from the terminal using the following curl command:
curl --data @genes.xml http://api-url
Where genes.xml is a local file containing the genes I want to submit
and
http://api-url is the API's address. However, I'm not sure how to
replicate
this command in R. The request payload and response payload are both
XML
streams, so I'm fairly certain this will require a combination of the
RCurl
and XML packages, but I've had no luck getting RCurl to work. I'd
really
appreciate some help with this.
Thanks,
Aaron
[[alternative HTML version deleted]]