struct Kemal::Route

Overview

Route is the main building block of Kemal.

It takes 3 parameters: http method, path and a handler to specify what action to be done if the route is matched.

Defined in:

kemal/route.cr

Constructors

Instance Method Summary

Constructor Detail

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

[View source]

Instance Method Detail

def handler : HTTP::Server::Context -> String #

[View source]
def method : String #

[View source]
def path : String #

[View source]