% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mw-text.R
\name{mw_text}
\alias{mw_text}
\title{Middleware to parse a plain text body}
\usage{
mw_text(default_charset = "utf-8", type = "text/plain")
}
\arguments{
\item{default_charset}{Encoding to set on the text.}

\item{type}{Content type to match before parsing. If it does not
match, then the request object is not modified.}
}
\value{
Handler function.
}
\description{
Adds the parsed object as the \code{text} element of the request object.
}
\examples{
app <- new_app()
app$use(mw_text())
app
}
\seealso{
Other middleware: 
\code{\link{mw_cgi}()},
\code{\link{mw_cookie_parser}()},
\code{\link{mw_etag}()},
\code{\link{mw_json}()},
\code{\link{mw_log}()},
\code{\link{mw_multipart}()},
\code{\link{mw_range_parser}()},
\code{\link{mw_raw}()},
\code{\link{mw_static}()},
\code{\link{mw_urlencoded}()}
}
\concept{middleware}
