json - download.file 错误不支持的 URL 方案

标签 json r web-services ubuntu

我正在使用一种算法 R,该算法调用一个网络服务,该网络服务对数据库进行查询并返回一个 JSON 对象。

url <- "https://example.com?id=1"
json_file <- "C:/xampp/htdocs/example/Download/data.json"
download.file(url, json_file)
document <- fromJSON(json_file)

在我的机器上,当我连接到服务器并运行时,算法通常运行不佳,出现以下错误:

Error in download.file(url, json_file) : unsupported URL scheme

这里的 url 是 https 有问题吗?

最佳答案

来自 ?download.file 的详细信息部分。

 Note that 'https://' URLs are only supported if '--internet2' or
 environment variable 'R_WIN_INTERNET2' was set or
 'setInternet2(TRUE)' was used (to make use of Internet Explorer
 internals), and then only if the certificate is considered to be
 valid.

关于json - download.file 错误不支持的 URL 方案,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21857264/

相关文章:

android - 循环遍历没有子名称的json对象

R 聚合和非空计数

r - 扩展 data.table 时出现奇怪的错误

web-services - 支付解决方案

python - 验证 'type' json 架构失败

android - 使用 firebase 的用户数据的 json 格式

r - 将 R 代码转换为 R 风格

PHP SoapClient __getLastRequest 和 __getLastRequestHeaders 调用成功返回 NULL

android - 在同一 Activity 中调用 Web 服务中的两种方法会出现异常

c# - 在 C# 中将具有变量名称/值对的 JSON 反序列化为对象