@@ -59,7 +59,7 @@ download_hydat <- function(dl_hydat_here = NULL, ask = TRUE) {
59
59
req <- httr2 :: request(url )
60
60
req <- httr2 :: req_method(req , " HEAD" )
61
61
req <- tidyhydat_agent(req )
62
- req <- req_perform (req )
62
+ req <- tidyhydat_perform (req )
63
63
httr2 :: resp_check_status(req )
64
64
65
65
size <- round(as.numeric(
@@ -83,7 +83,6 @@ download_hydat <- function(dl_hydat_here = NULL, ask = TRUE) {
83
83
if (! dl_overwrite ) {
84
84
info(" HYDAT is updated on a quarterly basis, check again soon for an updated version." )
85
85
}
86
- browser()
87
86
if (new_hydat != existing_hydat & ask ) { # New DB available or no local DB at all
88
87
msg <- paste0(
89
88
" This version of HYDAT is " , size , " MB in size and will take some time to download.
@@ -114,7 +113,7 @@ download_hydat <- function(dl_hydat_here = NULL, ask = TRUE) {
114
113
# # Download the zip file
115
114
hydb_req <- httr2 :: request(url )
116
115
hydb_req <- tidyhydat_agent(hydb_req )
117
- resp <- req_perform (hydb_req , tmp )
116
+ resp <- tidyhydat_perform (hydb_req , path = tmp )
118
117
httr2 :: resp_check_status(resp )
119
118
120
119
# # Extract the file to a temporary dir
@@ -157,7 +156,7 @@ hy_remote <- function() {
157
156
network_check(hy_base_url())
158
157
159
158
req <- httr2 :: request(hy_base_url())
160
- req <- httr2 :: req_perform (req )
159
+ req <- tidyhydat_perform (req )
161
160
resp <- httr2 :: resp_check_status(req )
162
161
163
162
0 commit comments