Skip to content

Commit

Permalink
Switch to httr so we can retry
Browse files Browse the repository at this point in the history
  • Loading branch information
PietrH committed Dec 11, 2024
1 parent 3f41d52 commit 93e3a82
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions R/get_reference.R
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@ get_reference <- function() {
"inst/data/processed/occurrence.csv"
)

readr::read_csv(
github_csv_url,
show_col_types = FALSE,
progress = FALSE
)
httr2::request(github_csv_url) %>%
httr2::req_retry() %>%
httr2::req_perform() %>%
httr2::resp_body_string() %>%
readr::read_csv(show_col_types = FALSE,
progress = FALSE)
}

0 comments on commit 93e3a82

Please sign in to comment.