Debian Codegraph @

man/httpResponse.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/middleware.R
3 \name{httpResponse}
4 \alias{httpResponse}
5 \title{Create an HTTP response object}
6 \usage{
7 httpResponse(
8 status = 200L,
9 content_type = "text/html; charset=UTF-8",
10 content = "",
11 headers = list()
12 )
13 }
14 \arguments{
15 \item{status}{HTTP status code for the response.}
16
17 \item{content_type}{The value for the \code{Content-Type} header.}
18
19 \item{content}{The body of the response, given as a single-element character
20 vector (will be encoded as UTF-8) or a raw vector.}
21
22 \item{headers}{A named list of additional headers to include. Do not include
23 \code{Content-Length} (as it is automatically calculated) or \code{Content-Type} (the
24 \code{content_type} argument is used instead).}
25 }
26 \description{
27 Create an HTTP response object
28 }
29 \examples{
30 httpResponse(status = 405L,
31 content_type = "text/plain",
32 content = "The requested method was not allowed"
33 )
34
35 }
36 \keyword{internal}