% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/capture-requests.R
\name{save_response}
\alias{save_response}
\title{Write out a captured response}
\usage{
save_response(response, file, simplify = TRUE)
}
\arguments{
\item{response}{An \code{httr2_response} object}

\item{file}{String file path to write to}

\item{simplify}{logical: if \code{TRUE} (default), JSON responses with status 200
and a supported \code{Content-Type}
will be written as just the text of the response body. In all other cases,
and when \code{simplify} is \code{FALSE}, the \code{httr2_response} object will be written
out to a .R file using \code{\link[base:dput]{base::dput()}}.}
}
\value{
The character file name that was written out
}
\description{
Write out a captured response
}
\keyword{internal}
