(wrap-hiccup handler)
(wrap-hiccup handler hiccup-renderer)
Middleware that renders vectors as HTML. The vector can either be the only response from the handler, or on the body key of the response map. Requires a function that converts Hiccup vectors into HTML.
Middleware that renders vectors as HTML. The vector can either be the only response from the handler, or on the body key of the response map. Requires a function that converts Hiccup vectors into HTML.
(wrap-hide-errors handler error-handler)
Middleware that hides any uncaught exceptions behind a 500 'Internal Error' response generated by an error handler. Intended for use in production when exception details need to be hidden.
Middleware that hides any uncaught exceptions behind a 500 'Internal Error' response generated by an error handler. Intended for use in production when exception details need to be hidden.
(wrap-log-errors handler logger)
Log any exceptions with the supplied logger, then re-throw them.
Log any exceptions with the supplied logger, then re-throw them.
(wrap-log-requests handler logger)
(wrap-log-requests handler logger {:keys [level] :or {level :info}})
Log each request using the supplied logger. The logger must implement the duct.core.protocols/Logger protocol.
Log each request using the supplied logger. The logger must implement the duct.core.protocols/Logger protocol.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close