Liking cljdoc? Tell your friends :D

io.pedestal.service.interceptors


html-bodyclj

Sets the Content-Type header to "text/html" if the body is a string and a type has not been set.

Sets the Content-Type header to "text/html" if the body is a string and a
type has not been set.
sourceraw docstring

json-bodyclj

Set the Content-Type header to "application/json" and convert the body to JSON if the body is a collection and a type has not been set.

Set the Content-Type header to "application/json" and convert the body to
JSON if the body is a collection and a type has not been set.
sourceraw docstring

log-requestclj

Log the request's method and uri.

Log the request's method and uri.
sourceraw docstring

not-foundclj

An interceptor that returns a 404 when routing failed to resolve a route, or no :response map was attached to the context.

An interceptor that returns a 404 when routing failed to resolve a route, or no :response
map was attached to the context.
sourceraw docstring

transit-body-interceptorclj

(transit-body-interceptor iname default-content-type transit-format)
(transit-body-interceptor iname
                          default-content-type
                          transit-format
                          transit-opts)

Returns an interceptor which sets the Content-Type header to the appropriate value depending on the transit format. Converts the body to the specified Transit format if the body is a collection and a type has not been set. Optionally accepts transit-opts which are handed to trasit/writer and may contain custom write handlers.

Expects the following arguments:

iname - namespaced keyword for the interceptor name default-content-type - content-type string to set in the response transit-format - either :json or :msgpack transit-options - optional. map of options for transit/writer

Returns an interceptor which sets the Content-Type header to the
appropriate value depending on the transit format. Converts the body
to the specified Transit format if the body is a collection and a
type has not been set. Optionally accepts transit-opts which are
handed to trasit/writer and may contain custom write handlers.

Expects the following arguments:

iname                - namespaced keyword for the interceptor name
default-content-type - content-type string to set in the response
transit-format       - either :json or :msgpack
transit-options      - optional. map of options for transit/writer
sourceraw docstring

transit-json-bodyclj

Set the Content-Type header to "application/transit+json" and convert the body to transit+json if the body is a collection and a type has not been set.

Set the Content-Type header to "application/transit+json" and convert the body to
transit+json if the body is a collection and a type has not been set.
sourceraw docstring

transit-msgpack-bodyclj

Set the Content-Type header to "application/transit+msgpack" and convert the body to transit+msgpack if the body is a collection and a type has not been set.

Set the Content-Type header to "application/transit+msgpack" and convert the body to
transit+msgpack if the body is a collection and a type has not been set.
sourceraw docstring

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

× close