io.pedestal.interceptor
Public API for creating interceptors, and various utility fns for common interceptor creation patterns.
*default-handler-names*
dynamic
added in 0.8.0
If true (the default) then functions converted to interceptor will get a default interceptor name based on the function class name.
If false, for compatibility, the interceptor will have no :name.
The system property io.pedestal.interceptor.disable-default-handler-names
if true, will default this to false.
interceptor
(interceptor t)
Given a value, produces and returns an Interceptor (Record)
t can be anything that extends the IntoInterceptor protocol; notably, this includes functions, which will be wrapped as interceptors, but act as handlers (a handler receives the request map and returns the response map).
interceptor-name
(interceptor-name n)
Ensures that an interceptor name (to eventually be the :name key of an Interceptor) is either a keyword or nil. Generally, interceptor names should be namespace-qualified keywords.
interceptor?
(interceptor? o)
Returns true if object o is an instance of the Interceptor record; the result of invoking interceptor.
IntoInterceptor
protocol
Conversion into Interceptor, ready for execution as part of an interceptor chain.
members
-interceptor
(-interceptor t)
Given a value, produce an Interceptor Record.