The non-JSON counterpart to perform(), for a source that ships a bulk flat
file rather than a per-record JSON API. The body lands in data as a single
string, so the envelope shape is the same either way and a caller does not
branch on which wrapper it used.
Arguments
- req
An httr2 request, prepared with
req_defaults().- source
A friendly label for the service, used in the user-facing message. For example
"gnomAD".- secret_query
A named list of query-string credentials. Appended here rather than by the caller, so
reqitself never carries them and neither does anything built fromreq$url. Seeredact_secrets().
Examples
breaker_reset()
req <- req_defaults(httr2::request("https://mock.test/genes.tsv"))
httr2::with_mocked_responses(
list(httr2::response(
status_code = 200,
body = charToRaw("gene\tscore\n")
)),
perform_text(req, "ClinGen")$data
)
#> [1] "gene\tscore\n"