How to post within a rvest html_session?

萝らか妹 提交于 2019-12-04 18:01:54

Ok, after some digging into it i solved it by using:

x %>% rvest:::request_POST(url,
          config(referer = x$url),
          user_agent("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_11_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.86 Safari/537.36"),
          body = list(...), 
          encode = "form")

Where rvest:::request_POST internally uses

httr::POST(url, x$config, ..., handle = x$handle)
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!