Liking cljdoc? Tell your friends :D

Pedestal

Pedestal is a well known interceptor-based web framework for Clojure. To use reitit-http with Pedestal, we need to change the default routing interceptor into a new one. Examples projects show how to do this.

Caveat

reitit-http defines Interceptors as reitit.interceptor/Interceptor. Compared to Pedestal 2-arity error handlers, reitit uses a simplified (1-arity) handlers. Differences in error handling are described in the Sieppari README.

  • you can use any pedestal-style interceptor within reitit router (as Pedestal is executing those anyway)
  • you can use any reitit-style interceptor that doesn't have :error-stage defined
  • using a reitit-style interceptor with :error defined will cause ArityException if invoked

See the error handling guide on how to handle errors with Pedestal.

Examples

Simple

With batteries

Can you improve this documentation?Edit on GitHub

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

× close