class Kemal::PathHandler

Overview

PathHandler wraps a HTTP::Handler to only execute for specific path prefixes.

Example

use "/api", AuthHandler.new

The handler will only execute for requests matching the path prefix:

Included Modules

Defined in:

kemal/path_handler.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(path_prefix : String, handler : HTTP::Handler) #

[View source]

Instance Method Detail

def call(context : HTTP::Server::Context) #

[View source]
def handler : HTTP::Handler #

[View source]
def path_prefix : String #

[View source]