Liking cljdoc? Tell your friends :D

muuntaja.middleware


wrap-exceptionclj

(wrap-exception handler)
(wrap-exception handler on-exception)

Middleware that catches exceptions of type :muuntaja/decode and invokes a 3-arity callback [^Exception e format request] which returns a response. Support async-ring.

Middleware that catches exceptions of type `:muuntaja/decode`
and invokes a 3-arity callback [^Exception e format request] which
returns a response. Support async-ring.
raw docstring

wrap-formatclj

(wrap-format handler)
(wrap-format handler prototype)

Middleware that negotiates a request body based on accept, accept-charset and content-type headers and decodes the body with an attached Muuntaja instance into :body-params. Encodes also the response body with the same Muuntaja instance based on the negotiation information or override information provided by the handler.

Takes a pre-configured Muuntaja or options maps as second argument. See https://github.com/metosin/muuntaja for all options and defaults. Supports async-ring.

Middleware that negotiates a request body based on accept, accept-charset
and content-type headers and decodes the body with an attached Muuntaja
instance into `:body-params`. Encodes also the response body with the same
Muuntaja instance based on the negotiation information or override information
provided by the handler.

Takes a pre-configured Muuntaja or options maps as second argument.
See https://github.com/metosin/muuntaja for all options and defaults.
Supports async-ring.
raw docstring

wrap-format-negotiateclj

(wrap-format-negotiate handler)
(wrap-format-negotiate handler prototype)

Middleware that negotiates a request body based on accept, accept-charset and content-type headers with an attached Muuntaja instance. Injects negotiation results into request for wrap-format-request to use.

Takes a pre-configured Muuntaja or options maps as second argument. See https://github.com/metosin/muuntaja for all options and defaults. Supports async-ring.

Middleware that negotiates a request body based on accept, accept-charset
and content-type headers with an attached Muuntaja instance. Injects negotiation
results into request for `wrap-format-request` to use.

Takes a pre-configured Muuntaja or options maps as second argument.
See https://github.com/metosin/muuntaja for all options and defaults.
Supports async-ring.
raw docstring

wrap-format-requestclj

(wrap-format-request handler)
(wrap-format-request handler prototype)

Middleware that decodes the request body with an attached Muuntaja instance into :body-params based on the negotiation information provided by wrap-format-negotiate.

Takes a pre-configured Muuntaja or options maps as second argument. See https://github.com/metosin/muuntaja for all options and defaults. Supports async-ring.

Middleware that decodes the request body with an attached Muuntaja
instance into `:body-params` based on the negotiation information provided
by `wrap-format-negotiate`.

Takes a pre-configured Muuntaja or options maps as second argument.
See https://github.com/metosin/muuntaja for all options and defaults.
Supports async-ring.
raw docstring

wrap-format-responseclj

(wrap-format-response handler)
(wrap-format-response handler prototype)

Middleware that encodes also the response body with the attached Muuntaja instance, based on request negotiation information provided by wrap-format-negotiate or override information provided by the handler.

Takes a pre-configured Muuntaja or options maps as second argument. See https://github.com/metosin/muuntaja for all options and defaults. Supports async-ring.

Middleware that encodes also the response body with the attached
Muuntaja instance, based on request negotiation information provided by
`wrap-format-negotiate` or override information provided by the handler.

Takes a pre-configured Muuntaja or options maps as second argument.
See https://github.com/metosin/muuntaja for all options and defaults.
Supports async-ring.
raw docstring

wrap-paramsclj

(wrap-params handler)

Middleware that merges request :body-params into :params. Supports async-ring.

Middleware that merges request `:body-params` into `:params`.
Supports async-ring.
raw docstring

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

× close