Liking cljdoc? Tell your friends :D

sweet-tooth.endpoint.middleware


not-foundclj

(not-found resp)
source

wrap-format-exceptionclj

(wrap-format-exception f {:keys [include-data]})

Catches exceptions and returns a formatted response.

Catches exceptions and returns a formatted response.
sourceraw docstring

wrap-latencyclj

(wrap-latency handler {:keys [sleep sleep-max]})

Introduce latency, useful for local dev when you want to simulate more realistic response times

Introduce latency, useful for local dev when you want to simulate
more realistic response times
sourceraw docstring

wrap-merge-paramsclj

(wrap-merge-params f)

Some middleware puts params in :body-params. Move it to :params

Some middleware puts params in :body-params. Move it to :params
sourceraw docstring

wrap-not-foundclj

(wrap-not-found handler error-handler)

Middleware that returns a 404 'Not Found' response from an error handler if the base handler returns nil.

Middleware that returns a 404 'Not Found' response from an error handler if
the base handler returns nil.
sourceraw docstring

wrap-printclj

(wrap-print f)

Print a request and response. For debugging.

Print a request and response. For debugging.
sourceraw docstring

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

× close