Send a POST request using httr R package

前端 未结 1 425
野趣味
野趣味 2021-02-12 22:40

I can\'t figure out how to imitate what the browser does, when sending the server data via a POST request. Here are the relevant URLs with explanation below.

(1)         


        
相关标签:
1条回答
  • 2021-02-12 23:32

    Try

    library(httr)
    login <- list(
      email = "login",
      password = "password",
      submit = "Login!"
    )
    res <- POST("http://kenpom.com/handlers/login_handler.php", body = login, encode = "form", verbose())
    team <- GET("http://kenpom.com/team.php?team=Rice", verbose())
    
    0 讨论(0)
提交回复
热议问题