我正在使用R,版本3.3.1。我从DATA API连接和检索数据的代码是:
library(jsonlite)
library(httr)
library(mongolite)
library(RCurl)
library(XML)
req <- list()
for (i in 1:length(report_exe())) {
reqOP <- rbind(fromJSON(toJSON(content(GET(url = "https://api.data-api.io/v1/oibstatus/",
add_headers('x-dataapi-key' = "59dd75a6525e"),
query = list(oib = report_exe()), httr::verbose()), type = "application/json"), null = "null"), flatten = TRUE))
req[[i]] <- reqOP
}
如您所见,我使用httr
包。如果我在本地运行此代码,在闪亮的应用程序内,它很好。但是如果我部署它,并通过shinyapp.io(https://forensis.shinyapps.io/Forensis/)运行它,它会返回一个错误:
SSL connection error
也许错误与shinyapp.io使用Linux作为操作系统的事实有关?