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.cr
orion/controller/base.cr

Constructors

Instance Method Summary

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

def self.new(context, websocket = nil) #

Initialize a new controller.


[View source]

Instance Method Detail

def context : HTTP::Server::Context #

The http context


[View source]
def websocket : HTTP::WebSocket #

The websocket, if the controller was initialized from a ws route.


[View source]
def websocket? : HTTP::WebSocket | Nil #

The websocket, if the controller was initialized from a ws route.


[View source]