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.
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.
Log the request's method and uri.
Log the request's method and uri.
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.
(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
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.
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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close