module Orion::Controller
Overview
The Orion::Controller
module can be included in any struct or class to add
the various helpers methods to make constructing your application easier.
Included Modules
Defined in:
orion/controller.crorion/controller/base.cr
Constructors
-
.new(context, websocket = nil)
Initialize a new controller.
Instance Method Summary
-
#context : HTTP::Server::Context
The http context
-
#websocket : HTTP::WebSocket
The websocket, if the controller was initialized from a
ws
route. -
#websocket? : HTTP::WebSocket | Nil
The websocket, if the controller was initialized from a
ws
route.
Instance methods inherited from module Orion::Controller::ResponseHelpers
content_type=(content_type)
content_type=,
response
response,
status=(status)
status=,
status_code=(status_code)
status_code=
Instance methods inherited from module Orion::Controller::RequestHelpers
format
format,
formats
formats,
host
host,
host_with_port
host_with_port,
path_params
path_params,
query_params
query_params,
remote_address
remote_address,
request
request,
resource
resource
Constructor methods inherited from module Orion::Controller::Rendering
new(context, websocket = nil)
new
Constructor Detail
Instance Method Detail
def websocket? : HTTP::WebSocket | Nil
#
The websocket, if the controller was initialized from a ws
route.