GitHub

API reference for Route.

method "*" matches every method, and a path ending in /* matches its prefix too. prefix is the mount point removed from the request URL before the handler runs.

Attributes

AttributeTypeDescription
methodMethod
pathstr
handlerEffect[HttpServerResponse, E_co, R_co]
uninterruptiblebool = False
prefixstr | None = None

Functions

__init__

__init__(method, path, handler, uninterruptible=False, prefix=None) -> None
ParameterTypeDescription
methodMethod
pathstr
handlerEffect[HttpServerResponse, E_co, R_co]
uninterruptiblebool = False
prefixstr | None = None

pipe

pipe[B](f) -> B
ParameterTypeDescription
fCallable[[Self], B]

Returns B

def pipe[B](self, f: Callable[[Self], B], /) -> B:
    return f(self)