class Grip::Handlers::HTTP

Defined in:

grip/handlers/http.cr

Constant Summary

CACHE_MASK = CACHE_SIZE - 1
CACHE_SIZE = 4096
VERB_IDS = {"GET" => 0_u8, "POST" => 1_u8, "PUT" => 2_u8, "DELETE" => 3_u8, "PATCH" => 4_u8, "HEAD" => 5_u8, "OPTIONS" => 6_u8, "ALL" => 255_u8}

Constructors

Instance Method Summary

Instance methods inherited from class Grip::Handlers::Base

add_route(verb : String, path : String, handler : HTTP::Handler, via : Symbol | Nil | Array(Symbol) | Nil, override : Proc(HTTP::Server::Context, HTTP::Server::Context) | Nil) : Nil add_route, call(context : HTTP::Server::Context) call, find_route(verb : String, path : String) : Radix::Result(Route) find_route

Constructor Detail

def self.new #

[View source]

Instance Method Detail

def add_route(verb : String, path : String, handler : ::HTTP::Handler, via : Symbol | Nil | Array(Symbol) | Nil = nil, override : Proc(::HTTP::Server::Context, ::HTTP::Server::Context) | Nil = nil) : Nil #

Unchanged signature


[View source]

Unchanged signature


[View source]
def find_route(verb : String, path : String) : Radix::Result(Route) #

Unchanged signature - returns Radix::Result(Route)


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

[View source]