module

LavinMQ::HTTP::Router

Inherits HTTP::Handler

Class methods

normalize_path(path : String) : String

%XX of an unreserved char is equivalent to the char (RFC 3986 6.2.2.2), so decode those to let literal segments match. The rest stays encoded: %2F must not become a separator, and decoded non-ASCII bytes could be invalid UTF-8, which makes Regex#match raise. A bare % is escaped so it can't pair with decoded digits into a new escape for URI.decode.

Source

Instance methods

call(context)
Source
delete(path : String, &block : Action)
Source
find_route(method, path)
Source
get(path : String, &block : Action)
Source
head(path : String, &block : Action)
Source
options(path : String, &block : Action)
Source
patch(path : String, &block : Action)
Source
post(path : String, &block : Action)
Source
put(path : String, &block : Action)
Source

Nested types