[metosin/reitit-middleware "0.7.0-alpha4"]
Any Ring middleware can be used with reitit-ring, but using data-driven middleware is preferred as they are easier to manage and in many cases yield better performance. reitit-middleware contains a set of common ring middleware, lifted into data-driven middleware.
reitit.ring.middleware.parameters/parameters-middleware to capture query- and form-params. Wraps
ring.middleware.params/wrap-params.
NOTE: This middleware will be factored into two parts: a query-parameters middleware and a Muuntaja format responsible for the the application/x-www-form-urlencoded body format. cf. https://github.com/metosin/reitit/issues/134
See Exception Handling with Ring.
See Content Negotiation.
Wrapper for Ring Multipart Middleware. Emits swagger :consumes definitions automatically.
Expected route data:
| key | description |
|---|---|
[:parameters :multipart] | mounts only if defined for a route. |
(require '[reitit.ring.middleware.multipart :as multipart])
multipart/multipart-middleware a preconfigured middleware for multipart handlingmultipart/create-multipart-middleware to generate with custom configurationreitit.ring.middleware.dev/print-request-diffs is a middleware chain transforming function. It prints a request and response diff between each middleware. To use it, add the following router option:
:reitit.middleware/transform reitit.ring.middleware.dev/print-request-diffs
Partial sample output:

See an example app with the default middleware in action: https://github.com/metosin/reitit/blob/master/examples/ring-malli-swagger/src/example/server.clj.
Can you improve this documentation? These fine people already did:
Tommi Reiman, Miikka Koskinen, Juho Teperi, tjalkane, Joel Kaasinen, Marcus Spiegel, Dennis Schridde, Phil Hofmann, J Hacksworth & Wanderson FerreiraEdit on GitHub
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 |