首页 > 解决方案 > R new_handle 函数不能正常工作?

问题描述

我需要运行以下代码

library(curl)
user= "GEAS"
password= "878282193100310"
content = paste("username=", user, "&password=", password, sep="") 
h <- new_handle(copypostfields = content) 
handle_setheaders(h, 
                  "Content-Type" = "application/x-www-form-urlencoded" 
) 
handle_setopt(h, ssl_verifypeer = FALSE, ssl_verifyhost = FALSE)

new_handle但是,此代码在应用函数时停止在行。运行此行时,我有以下输出

> h
<curl handle> (empty)

如何使new_handle功能正常工作?

标签: rcurl

解决方案


推荐阅读