POST request using RCurl

后端 未结 5 994
予麋鹿
予麋鹿 2020-12-01 10:01

As a way of exploring how to make a package in R for the Denver RUG, I decided that it would be a fun little project to write an R wrapper around the datasciencetoolkit API.

5条回答
  •  佛祖请我去吃肉
    2020-12-01 10:18

    With httr, this is just:

    library(httr)
    r <- POST("http://www.datasciencetoolkit.org/text2people", 
      body = "Tim O'Reilly, Archbishop Huxley")
    stop_for_status(r)
    content(r, "parsed", "application/json")
    

提交回复
热议问题