Liking cljdoc? Tell your friends :D

io.pedestal.http.route.prefix-tree


add-satisfies-constraints?clj

(add-satisfies-constraints? {:keys [query-constraints path-constraints]
                             :as route})

Given a route, add a function of the request which returns true if the request satisfies all path and query constraints.

Given a route, add a function of the request which returns true if
the request satisfies all path and query constraints.
raw docstring

contains-wilds?clj

(contains-wilds? path-spec)

Return true if the given path-spec contains any wildcard params or catch-alls.

Return true if the given path-spec contains any wildcard params or
catch-alls.
raw docstring

create-payload-fnclj

(create-payload-fn routes)

Given a sequence of routes, return a function of a request which will return a matching route. When the returned function is called we already know that the path matches. The function only considers method, host, scheme and port and will return the most specific match.

Given a sequence of routes, return a function of a request which
will return a matching route. When the returned function is called
we already know that the path matches. The function only considers
method, host, scheme and port and will return the most specific
match.
raw docstring

insertclj

(insert node path-spec o)

Given a tree node, a path-spec and a payload object, return a new tree with payload inserted.

Given a tree node, a path-spec and a payload object, return a new
tree with payload inserted.
raw docstring

lookupclj

(lookup node path)

Given a tree node and request path, find a matching leaf node and return the path params and payload or return nil if no match is found. Returns a map with :path-params and :payload keys.

Given a tree node and request path, find a matching leaf node and
return the path params and payload or return nil if no match is
found. Returns a map with :path-params and :payload keys.
raw docstring

partition-wildsclj

(partition-wilds path-spec)

Given a path-spec string, return a seq of strings with wildcards and catch-alls separated into their own strings. Eats the forward slash following a wildcard.

Given a path-spec string, return a seq of strings with wildcards
and catch-alls separated into their own strings. Eats the forward
slash following a wildcard.
raw docstring

routerclj

(router routes)

Given a sequence of routes, return a router which satisfies the io.pedestal.http.route.router/Router protocol.

Given a sequence of routes, return a router which satisfies the
io.pedestal.http.route.router/Router protocol.
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close