Skip to content

Commit

Permalink
fix: remove "wininet" download method
Browse files Browse the repository at this point in the history
  • Loading branch information
philbosch committed Jun 16, 2024
1 parent 2662677 commit 1f8b4b1
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions R/download_data.R
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 1f8b4b1

Please sign in to comment.