% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/req_perform.R
\name{req_perform}
\alias{req_perform}
\title{Perform a Request to Get a Response}
\usage{
req_perform(
  req,
  path = NULL,
  verbosity = NULL,
  mock = getOption("httr2_mock", NULL),
  error_call = rlang::current_env()
)
}
\arguments{
\item{req}{Either a \code{\link[httr2:request]{httr2::request()}} class object or an \code{odata_request}
class object. The latter can be created with \code{\link[=dse_odata_products_request]{dse_odata_products_request()}} and
\code{\link[=dse_odata_bursts_request]{dse_odata_bursts_request()}}.}

\item{path}{Optionally, path to save body of the response. This is useful
for large responses since it avoids storing the response in memory.}

\item{verbosity}{How much information to print? This is a wrapper
around \code{\link[httr2:req_verbose]{req_verbose()}} that uses an integer to control verbosity:
\itemize{
\item \code{0}: no output
\item \code{1}: show headers
\item \code{2}: show headers and bodies
\item \code{3}: show headers, bodies, and curl status messages.
}

Use \code{\link[httr2:with_verbosity]{with_verbosity()}} to control the verbosity of requests that
you can't affect directly.}

\item{mock}{A mocking function. If supplied, this function is called
with the request. It should return either \code{NULL} (if it doesn't want to
handle the request) or a \link[httr2]{response} (if it does). See
\code{\link[httr2:with_mocked_responses]{with_mocked_responses()}}/\code{local_mocked_responses()} for more details.}

\item{error_call}{The execution environment of a currently
running function, e.g. \code{caller_env()}. The function will be
mentioned in error messages as the source of the error. See the
\code{call} argument of \code{\link[rlang:abort]{abort()}} for more information.}
}
\value{
Returns a \code{httr2::response} class object
}
\description{
A wrapper around \code{\link[httr2:req_perform]{httr2::req_perform()}}, which can also handle
\code{odata_request} class objects. Check \code{\link[httr2:req_perform]{httr2::req_perform()}}
for details.
}
\seealso{
Other tidyverse:
\code{\link{tidy_verbs}}
}
\concept{tidyverse}
