class Kemal::RouteHandler

Overview

Main handler which handles all the HTTP requests. Routing, parsing, rendering e.g are done in this handler.

Included Modules

Defined in:

kemal/route_handler.cr

Constant Summary

INSTANCE = new

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def add_route(method : String, path : String, &handler : HTTP::Server::Context -> _) #

Adds a given route to routing tree. As an exception each GET route additionaly defines a corresponding HEAD route.


[View source]
def call(context : HTTP::Server::Context) #

[View source]
def lookup_route(verb : String, path : String) #

Check if a route is defined and returns the lookup


[View source]
def routes : Radix::Tree(Kemal::Route) #

[View source]
def routes=(routes) #

[View source]