diff --git a/R/internal_functions.R b/R/internal_functions.R index 923f479..340ff9e 100644 --- a/R/internal_functions.R +++ b/R/internal_functions.R @@ -28,6 +28,21 @@ } } + +#' Create curl Handles +#' @return a \CRANpkg{curl} handle for use in downloading files +#' @noRd +#' @keywords Internal +create_handle <- function() { + h <- curl::new_handle() + curl::handle_setopt( + handle = h, + TCP_KEEPALIVE = 200000, + CONNECTTIMEOUT = 90, + http_version = 2 + ) +} + #' Use httr2 to Fetch a File With Retries #' #' Retries to download the requested resource five times before stopping. Then