Is there any HTTP library in R?

I need to do HTTP POST commands using R. Are there any R http libraries that can do this?

+4
source share
2 answers

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 published object and headings, you can use it directly curlPerform.

+10
source

Another alternative that may be more usable is httr :

Useful tools for working with HTTP organized by HTTP verbs (GET (), POST (), etc.). The configuration functions make it easy to manage additional request components (authenticate (), add_headers (), etc.).

0

Source: https://habr.com/ru/post/1754335/


All Articles