kemal/src/kemal/context.cr

16 lines
346 B
Crystal
Raw Normal View History

# Context is the environment which holds request/response specific
# information such as params, content_type e.g
2015-10-23 18:33:26 +00:00
class Kemal::Context
getter request
2015-10-28 16:09:45 +00:00
getter params
2015-10-28 18:52:34 +00:00
getter content_type
2015-10-28 16:09:45 +00:00
def initialize(@request, @params)
@content_type = "text/html"
end
2015-10-28 18:52:34 +00:00
def set_content_type(content_type)
@content_type = content_type
end
end