Liking cljdoc? Tell your friends :D

pedestal-toolbox.content-negotiation


->transitclj

(->transit data type)
source

->transit-json-stringclj

(->transit-json-string data)
source

->transit-msgpack-bytesclj

(->transit-msgpack-bytes data)
source

default-media-type-fnsclj

source

negotiate-response-content-typeclj

(negotiate-response-content-type acceptable-media-types)
(negotiate-response-content-type acceptable-media-types media-type-fns)

Creates an interceptor with an enter fn that negotiates content type based on an ordered sequence of acceptable-media-types, adding the best choice to the request at the key :media-type. If no acceptable content type is available, replies with a 406 Not Acceptable.

Its leave fn looks for the :media-type key on the request and a :content key on the response and encodes it into the body according to the media-type-fns map. A set of default media-type-fns is provided.

Creates an interceptor with an enter fn that negotiates content
type based on an ordered sequence of acceptable-media-types, adding
the best choice to the request at the key :media-type.  If no
acceptable content type is available, replies with a 406 Not
Acceptable.

Its leave fn looks for the :media-type key on the request and
a :content key on the response and encodes it into the body
according to the media-type-fns map. A set of default
media-type-fns is provided.
sourceraw docstring

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

× close