From 1f8b4b11484a560f77042f7191b458e429f0415c Mon Sep 17 00:00:00 2001 From: philbosch Date: Sun, 16 Jun 2024 12:56:40 +0200 Subject: [PATCH] fix: remove "wininet" download method --- R/download_data.R | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/R/download_data.R b/R/download_data.R index d8934f9..dafd48b 100644 --- a/R/download_data.R +++ b/R/download_data.R @@ -69,20 +69,13 @@ read_data.default <- function(ds) { temp_file <- paste0("temp.", file_ext) - # check which system is used to set the download method - if (Sys.info()["sysname"] == "Windows"){ - download_method <- "wininet" - }else{ - download_method <- "auto" - } - # Download the file withr::with_envvar(new = c("no_proxy" = "dam-api.bfs.admin.ch"), - code = download.file(url = ds$read_path, destfile = temp_file, method = download_method, mode = "wb")) + code = download.file(url = ds$read_path, destfile = temp_file, mode = "wb")) # Import the data ds$data <- rio::import(temp_file, which = ds$which_data, header = TRUE)