The type parameter is typically the file extension.
type
httpResponse.contentType(type = "text")
file type or standard extension
A character string with the appropriate MIME type.
# NOT RUN { httpResponse.contentType('text') httpResponse.contentType('json') httpResponse.contentType('png') # }
Run the code above in your browser using DataLab