A wrapper around httr2::req_perform(), which can also handle
odata_request class objects. Check httr2::req_perform()
for details.
Usage
req_perform(
req,
path = NULL,
verbosity = NULL,
mock = getOption("httr2_mock", NULL),
error_call = rlang::current_env()
)Arguments
- req
Either a
httr2::request()class object or anodata_requestclass object. The latter can be created withdse_odata_products_request()anddse_odata_bursts_request().- path
Optionally, path to save body of the response. This is useful for large responses since it avoids storing the response in memory.
- verbosity
How much information to print? This is a wrapper around
req_verbose()that uses an integer to control verbosity:0: no output1: show headers2: show headers and bodies3: show headers, bodies, and curl status messages.
Use
with_verbosity()to control the verbosity of requests that you can't affect directly.- mock
A mocking function. If supplied, this function is called with the request. It should return either NULL (if it doesn't want to handle the request) or a response (if it does). See
httr2::with_mock()/ local_mock() for more details.- error_call
The execution environment of a currently running function, e.g.
caller_env(). The function will be mentioned in error messages as the source of the error. See thecallargument ofabort()for more information.
Value
Returns a httr2::response class object