R/httr2.R

Defines functions req_wb_retry wb_user_agent

wb_user_agent <- function() {
  sprintf("worldbank/%s", utils::packageVersion("worldbank"))
}

req_wb_retry <- function(req) {
  req_retry(req, max_tries = 3L, is_transient = \(resp) resp_status(resp) %in% c(429L, 500L, 503L))
}

Try the worldbank package in your browser

Any scripts or data that you put into this service are public.

worldbank documentation built on March 15, 2026, 5:07 p.m.