MazamaWebUtils (version 0.1.7)

httpResponse.contentType: Create a Content Type String

Description

The type parameter is typically the file extension.

Usage

httpResponse.contentType(type = "text")

Arguments

type

file type or standard extension

Value

A character string with the appropriate MIME type.

Examples

Run this code
# NOT RUN {
httpResponse.contentType('text')
httpResponse.contentType('json')
httpResponse.contentType('png')
# }

Run the code above in your browser using DataLab