Perform a request to an API endpoint
api_perform.RdPerform a request to an API endpoint
Arguments
- req
a request object
- dry_run
if TRUE, the call is printed to the console instead of being sent to the API, which is useful for debugging
- verbosity
How much information to print to the console. Defaults to 0.
0: no output
1: show headers
2: show headers and body
3: show headers, body, and curl status messages
- timeout
request timeout in seconds (default is 300)
See also
api_get(), api_post(), api_patch(), api_delete() which
call this function internally
Examples
if (FALSE) { # \dontrun{
httr2::request("https://counts.spdgt.com/api/me") |>
api_perform()
} # }