+# Copyright (C) The Arvados Authors. All rights reserved.
+#
+# SPDX-License-Identifier: Apache-2.0
+
source("./R/util.R")
HttpRequest <- R6::R6Class(
config <- httr::add_headers(unlist(headers))
if(toString(Sys.getenv("ARVADOS_API_HOST_INSECURE") == "TRUE"))
- config$options = list(ssl_verifypeer = FALSE)
+ config$options = list(ssl_verifypeer = 0L)
# times = 1 regular call + numberOfRetries
response <- httr::RETRY(verb, url = url, body = body,
}
return("")
+ },
+
+ getConnection = function(url, headers, openMode)
+ {
+ h <- curl::new_handle()
+ curl::handle_setheaders(h, .list = headers)
+
+ if(toString(Sys.getenv("ARVADOS_API_HOST_INSECURE") == "TRUE"))
+ curl::handle_setopt(h, ssl_verifypeer = 0L)
+
+ conn <- curl::curl(url = url, open = openMode, handle = h)
}
),