From 0ad84908d41e84d0c99f459b1553a3880ba8bff1 Mon Sep 17 00:00:00 2001 From: "Manuel F. Schmid" Date: Thu, 8 May 2025 11:01:32 -0400 Subject: [PATCH] Accept `URI` in `download` function --- src/download.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/download.jl b/src/download.jl index a92b88fd..9fc77b92 100644 --- a/src/download.jl +++ b/src/download.jl @@ -93,7 +93,7 @@ from the rules of the HTTP. - `headers` specifies headers to be used for the HTTP GET request - any additional keyword args (`kw...`) are passed on to the HTTP request. """ -function download(url::AbstractString, local_path=nothing, headers=Header[]; update_period=1, kw...) +function download(url::Union{URI, AbstractString}, local_path=nothing, headers=Header[]; update_period=1, kw...) format_progress(x) = round(x, digits=4) format_bytes(x) = !isfinite(x) ? "∞ B" : Base.format_bytes(round(Int, x)) format_seconds(x) = "$(round(x; digits=2)) s"