class

Amber::Controller::Helpers::Responders::Content

Inherits Reference < Object

Constants

ACCEPT_SEPARATOR_REGEX = /,|,\s/
SUPPORTED_FORMATS = Set.new(TYPE.keys.map(&.to_s))
TYPE = { html: "text/html", json: "application/json; charset=utf-8", txt: "text/plain", text: "text/plain", xml: "application/xml", js: "text/javascript", }
TYPE_EXT_REGEX = /\.(#{TYPE.keys.join("|")})$/

Constructors

new(requested_responses : Array(String))
Source

Instance methods

body
Source
html(value : String | ProcType)
Source
html
Source
js(value : String | ProcType)
Source
json(value : String | ProcType)
Source
json
Source
json(value : Hash(Symbol | String, String))
Source
json
Source
text(value : String | ProcType)
Source
text
Source
type
Source
xml(value : String | ProcType)
Source