Description Usage Arguments Details Value Author(s) Examples
Build a new AnalysisPageResponse object
1 | new.response(body, content.type, status = 200, headers = character())
|
body |
Either a raw vector or a character vector that constitutes the response body. |
content.type |
A string giving the content-type, such as "text/plain" |
status |
Integer. An HTTP response status. Default, 200, means HTTP_OK |
headers |
Named charvec of extra HTTP headers. Default: |
A handler may return an AnalysisPageResponse object, which is basically a complete response, if it doesn't want the framework to do any extra processing. This allows complete control over the response.
AnalysisPageResponse object
Brad Friedman
1 2 3 | poem.file <- system.file("examples/in-a-station-of-the-metro.html", package="AnalysisPageServer")
poem.html <- readLines(poem.file, warn = FALSE)
new.response(paste0(poem.html, "\n"), content.type = "text/html")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.