Implementation of the default interceptors.
See blueprint.handler
for reasoning
Implementation of the default interceptors. See `blueprint.handler` for reasoning
An interceptor which extracts the response key to conform to ring behavior
An interceptor which extracts the response key to conform to ring behavior
(get-root-paths prefix)
An interceptor which defers to a provided handler
An interceptor which defers to a provided handler
A generic request/response/error logger that logs request and elapsed time. Rethrows any error
A generic request/response/error logger that logs request and elapsed time. Rethrows any error
Request normalizer, merges params coming from the body, path, or query string and produces a single input map. Assoc's the handler name to allow command spec evaluation
Request normalizer, merges params coming from the body, path, or query string and produces a single input map. Assoc's the handler name to allow command spec evaluation
Quit the chain when the handler is not found.
Quit the chain when the handler is not found.
Retrieve original request from a context
Retrieve original request from a context
(prepare-payload paths context)
A helper for handler
which pulls appropriate keys from the context to
prepare the request payload.
By default (for a nil path spec), the value stored at :request
in the
context is extracted.
For a value of :blueprint.handler/raw
, the context itself is passed down.
If a collection of keys is given, it is looked up in the context.
The last possible specification allows fetching keys in various places in the context to build the resulting request payload. In this case the specification is given as a map of path to path, with the option to ask for merging of the result:
{[:request] :blueprint.handler/merge
[:subsystem :some/generated-id] [:important-id]}
In this map paths are always expressed as collection of keys.
In the target specification, a value of :blueprint.handler/merge
will merge the result of the lookup onto the request payload, rather
than associng it.
A helper for `handler` which pulls appropriate keys from the context to prepare the request payload. By default (for a nil path spec), the value stored at `:request` in the context is extracted. For a value of `:blueprint.handler/raw`, the context itself is passed down. If a collection of keys is given, it is looked up in the context. The last possible specification allows fetching keys in various places in the context to build the resulting request payload. In this case the specification is given as a map of path to path, with the option to ask for merging of the result: {[:request] :blueprint.handler/merge [:subsystem :some/generated-id] [:important-id]} In this map paths are always expressed as collection of keys. In the target specification, a value of `:blueprint.handler/merge` will merge the result of the lookup onto the request payload, rather than associng it.
(resettable-inputstream payload-opts ctx)
Routing interceptor, needs router from blueprint.router/generate-router
Routing interceptor, needs router from `blueprint.router/generate-router`
Service descriptor interceptor, happens after routing on :not-found
errors
Service descriptor interceptor, happens after routing on `:not-found` errors
Validates and coerces normalized input as per spec if possible or throws
Validates and coerces normalized input as per spec if possible or throws
assert the body request is an input stream instance that is resettable, which means supports reset operation.
assert the body request is an input stream instance that is resettable, which means supports reset operation.
Wrap response from handler in a valid ring response map if none is found
Wrap response from handler in a valid ring response map if none is found
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close