Liking cljdoc? Tell your friends :D

blueprint.handler.default

Implementation of the default interceptors. See blueprint.handler for reasoning

Implementation of the default interceptors.
See `blueprint.handler` for reasoning
raw docstring

add-original-requestclj

Store original request

Store original request
raw docstring

finalclj

An interceptor which extracts the response key to conform to ring behavior

An interceptor which extracts the response key to conform to ring behavior
raw docstring

get-root-pathsclj

(get-root-paths prefix)

handlerclj

An interceptor which defers to a provided handler

An interceptor which defers to a provided handler
raw docstring

loggerclj

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
raw docstring

normalizeclj

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
raw docstring

not-foundclj

Quit the chain when the handler is not found.

Quit the chain when the handler is not found.
raw docstring

original-requestclj

Retrieve original request from a context

Retrieve original request from a context
raw docstring

payload-sizecljmultimethod


prepare-payloadclj

(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.
raw docstring

resettable-inputstreamclj

(resettable-inputstream payload-opts ctx)

routeclj

Routing interceptor, needs router from blueprint.router/generate-router

Routing interceptor, needs router from `blueprint.router/generate-router`
raw docstring

service-descclj

Service descriptor interceptor, happens after routing on :not-found errors

Service descriptor interceptor, happens after routing on `:not-found` errors
raw docstring

transformclj

Validates and coerces normalized input as per spec if possible or throws

Validates and coerces normalized input as per spec if possible or throws
raw docstring

wrap-input-streamclj

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.
raw docstring

wrap-response-bodyclj

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
raw docstring

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

× close