I need to make HTTP POST commands using R. Are there any R http libraries that can do this?
Yes, RCurl
library(RCurl)
# example from the vignette:
x = postForm('http://www.wormbase.org/db/searches/advanced/dumper',
species="briggsae",
list="",
flank3="0",
flank5="0",
feature="Gene Models",
dump = "Plain TEXT",
orientation = "Relative to feature",
relative = "Chromsome",
DNA ="flanking sequences only",
.cgifields =c("feature", "orientation", "DNA", "dump", "relative"))
If you want fine-grained control over the posted entity and headers, you can use curlPerform
directly.
Another alternative that may be more convenient to use is httr:
Useful tools for working with HTTP organised by HTTP verbs (GET(), POST(), etc). Configuration functions make it easy to control additional request components (authenticate(), add_headers() and so on).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With