Router utilities for HTTP request handling using matching on path/method.
Provides functions for building and matching routes, adapted from clj-simple-router but modified to match on named path parameters (e.g. '/foo/{bar}') and HTTP methods instead of simple wildcards.
Exposes:
Router utilities for HTTP request handling using matching on path/method.
Provides functions for building and matching routes, adapted from
clj-simple-router but modified to match on named path parameters
(e.g. '/foo/{bar}') and HTTP methods instead of simple wildcards.
Exposes:
- make-matcher: Builds a matcher from a set of routes.
- match: Attempts to match a matcher against a Ring-style request.
- router: Builds a matcher from an OpenAPI schema and optional extra routes.(make-matcher routes)Given set of routes, builds matcher structure. See router
Given set of routes, builds matcher structure. See `router`
(match matcher request)Given matcher attempts to match against ring request, return match (tuple of
data & path-params)
Given `matcher` attempts to match against ring request, return match (tuple of `data` & `path-params`)
(router {:as _schema :keys [openapi-schema]}
        openapi-handlers
        &
        {:as _opts :keys [extra-routes] :or {extra-routes {}}})Creates a router that matches by method/path for a given schema.
extra-routes can be passed to add non openapi centric routes to the routing
table
Creates a router that matches by method/path for a given `schema`. `extra-routes` can be passed to add non openapi centric routes to the routing table
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs | 
| ← | Move to previous article | 
| → | Move to next article | 
| Ctrl+/ | Jump to the search field |