问题描述
我只是想在下面获得一个简单的 URL 响应,但出现以下错误.该网站是有效的,过去我已经能够从中提取数千次.
I'm just trying to get a simple URL response below and I get the following error. The website is valid and I've been able to pull from it thousands of times in the past.
jsonString <- getURL(full_url)
Error in function (type, msg, asError = TRUE) :
SSL certificate problem: certificate has expired
有什么想法吗?我正在运行 R 4.0.0(我升级以查看是否可以解决问题)并且拥有最新的 RCurl 包.
Any ideas? I am running R 4.0.0 (I upgraded to see if that would fix the issue) and have the most up to date RCurl package.
推荐答案
过去几周我一直面临同样的问题.因此,如果您正在使用 Rstudio 和 Rcurl 包并收到函数错误(类型,味精,asError = TRUE):SSL 证书问题:证书已过期"错误,请尝试以下代码.
I have been facing the same problem from the past few weeks. So if you are using Rstudio and Rcurl package and getting the "Error in function (type, msg, asError = TRUE) : SSL certificate problem: certificate has expired" error, try the below code.
RCurl_raw <- RCurl::postForm(
uri = redcap_uri
, token = token
, content = 'record'
, format = 'csv'
, type = 'flat'
, rawOrLabel = 'raw'
, exportDataAccessGroups = 'true'
, .opts = RCurl::curlOptions(ssl.verifypeer=FALSE, verbose=TRUE)
)
ssl.verifypeer 应该是假的.
ssl.verifypeer should be false.
这篇关于如何解决此 RCurl 错误:“SSL 证书问题:证书已过期"?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!