This function ensures that a request has httr2::req_retry()
applied, and
then performs the request, using either httr2::req_perform_iterative()
(if
a next_req
function is supplied) or httr2::req_perform()
(if not).
Arguments
- req
The first request to perform.
- ...
These dots are for future extensions and must be empty.
- next_req
An optional function that takes the previous response (
resp
) to generate the next request in a call tohttr2::req_perform_iterative()
. This function can usually be generated using one of the iteration helpers described inhttr2::iterate_with_offset()
.- max_reqs
The maximum number of separate requests to perform. Passed to the max_reqs argument of
httr2::req_perform_iterative()
whennext_req
is supplied. The default2
should likely be changed toInf
after you validate the function.- max_tries_per_req
The maximum number of times to attempt each individual request. Passed to the
max_tries
argument ofhttr2::req_retry()
.
Value
A list of httr2::response()
objects, one for each request
performed.