Thin httr2 wrapper used by the ESPN MLB wrappers. Supports optional query
parameters, custom headers, and proxy routing. Proxy resolution order:
proxy argument (caller-supplied, highest precedence).
getOption("baseballr.proxy") (session-level fallback -- set once with
options(baseballr.proxy = ...); ESPN wrappers call .retry_request()
directly without ..., so per-call overrides are not threaded through).
http_proxy / https_proxy / no_proxy env vars (read by libcurl
automatically when no explicit proxy is supplied).
.retry_request(
url,
params = list(),
headers = NULL,
timeout = 60,
proxy = NULL
)An httr2::response object.
The URL to request.
Named list of query parameters (default: empty list).
Named character vector of headers (default: NULL).
Timeout in seconds (default: 60).
Optional proxy (see above). Defaults to
getOption("baseballr.proxy").
The proxy value accepts a single URL string ("http://host:port", passed
to httr2::req_proxy(url = )) or a named list spread as keyword args into
httr2::req_proxy() (url, port, username, password, auth).