foundry_req_perform_many: Perform Many Requests

View source: R/utils.R

foundry_req_perform_manyR Documentation

Perform Many Requests

Description

Internal helper that performs a list of httr2 requests. By default it uses httr2::req_perform_parallel() for speed. When the option foundryR.sequential_requests is TRUE, the requests are performed one at a time with httr2::req_perform() instead.

Usage

foundry_req_perform_many(reqs, progress = FALSE, max_active = 2L)

Arguments

reqs

A list of httr2 request objects.

progress

Passed to httr2::req_perform_parallel().

max_active

Passed to httr2::req_perform_parallel().

Details

Parallel requests bypass httr2's mocking hook, so the sequential path is what lets httptest2 record and replay documentation fixtures for batched calls such as foundry_embed() and foundry_extract() (see inst/httptest2/start-vignette.R). Both paths return a list, in request order, whose elements are either an httr2 response or the error condition raised for that request, mirroring req_perform_parallel(on_error = "continue").

Value

A list of responses or error conditions, in the order of reqs.


foundryR documentation built on Sept. 25, 2026, 1:10 a.m.