[metosin/reitit-middleware "0.5.6"]
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: 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.
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-swagger/src/example/server.clj.
Can you improve this documentation? These fine people already did:
Tommi Reiman, J Hacksworth, Wanderson Ferreira, Miikka Koskinen, Marcus Spiegel & tjalkaneEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close