R/httr2.R

Defines functions base_request req_bbk_retry bbk_user_agent

bbk_user_agent = function() {
  sprintf("bbk/%s", utils::packageVersion("bbk"))
}

req_bbk_retry = function(req) {
  req_retry(req, max_tries = 3L)
}

base_request = function(url) {
  request(url) |>
    req_user_agent(bbk_user_agent()) |>
    req_bbk_retry() |>
    req_bbk_cache()
}

Try the bbk package in your browser

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

bbk documentation built on Aug. 28, 2026, 5:07 p.m.