Files
shiny/man/httpResponse.Rd
Joe Cheng a5a7224228 Allow function-based UI to return a complete HTTP response
This allows the UI handler to have total control over the response,
including status code (for redirects) or content type (for serving
up files).
2020-07-15 14:36:54 -07:00

37 lines
960 B
R

% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/middleware.R
\name{httpResponse}
\alias{httpResponse}
\title{Create an HTTP response object}
\usage{
httpResponse(
status = 200L,
content_type = "text/html; charset=UTF-8",
content = "",
headers = list()
)
}
\arguments{
\item{status}{HTTP status code for the response.}
\item{content_type}{The value for the \code{Content-Type} header.}
\item{content}{The body of the response, given as a single-element character
vector (will be encoded as UTF-8) or a raw vector.}
\item{headers}{A named list of additional headers to include. Do not include
\code{Content-Length} (as it is automatically calculated) or \code{Content-Type} (the
\code{content_type} argument is used instead).}
}
\description{
Create an HTTP response object
}
\examples{
httpResponse(status = 405L,
content_type = "text/plain",
content = "The requested method was not allowed"
)
}
\keyword{internal}