Learn R Programming

webfakes (version 1.3.0)

mw_raw: Middleware to read the raw body of a request

Description

Adds the raw body, as a raw object to the raw field of the request.

Usage

mw_raw(type = "application/octet-stream")

Value

Handler function.

Arguments

type

Content type to match. If it does not match, then the request object is not modified.

See Also

Other middleware: mw_cgi(), mw_cookie_parser(), mw_etag(), mw_json(), mw_log(), mw_multipart(), mw_range_parser(), mw_static(), mw_text(), mw_urlencoded()

Examples

Run this code
app <- new_app()
app$use(mw_raw())
app

Run the code above in your browser using DataLab