class ActionController::Router::RouteHandler

Included Modules

Defined in:

action-controller/router/route_handler.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def add_route(method : String, path : String, action : Tuple(Action, Bool)) #

Adds a route handler to the system Determines if routes are static or require decomposition and stores them appropriately


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

Routes requests to the appropriate handler Called from HTTP::Server in server.cr


[View source]
def process_request(search_path, context, controller_dispatch, head_request) #

We split out the processing of the request for simplified injection of telemetry


[View source]
def search_route(method, req_path, search_path, context : HTTP::Server::Context) : Tuple(Action, Bool) | Nil #

Builds the internal representation of a route then searches static routes before checking the matcher


[View source]