respond: Respond to HTTP request using a given MIME type

Description Usage Arguments Examples

Description

Responds to an HTTP request using a given MIME type

Usage

1
respond(content, mime)

Arguments

content

a character string containing the content

mime

a character string containing the MIME type (e.g. "text/html" or "image/gif")

Examples

1
2
3
error <- "Insufficient amount of coffee!"
errorHTML <- interpolate("../../html/app/error.html",c(message=error))
respondHTML(errorHTML)

jweile/cgir documentation built on May 10, 2019, 10:02 a.m.