(format-response-body request response accept-types transit-opts raise)
(infer-response-content-type {:keys [body] :as request} accept-types)
(wrap-restful-format handler
&
[{:keys [content-types accept-types keywordize?
transit-opts]}])
attempts to infer the request content type using the content-type header serializes the response based on the first known accept header
the handler can be followed by a map of options
option keys: :content-types a set of strings matching the content types :accept-types a set of strings mactching accept types, ressolves in client preferred order :keywordize? a boolean specifying whether to keywordize the parsed JSON request body :transit-opts a map containing transit configuration options of the form {:reader {:type ... :opts ...} :writer {:type ... :opts ...} where :type and :opts are exactly as defined in the transit spec
attempts to infer the request content type using the content-type header serializes the response based on the first known accept header the handler can be followed by a map of options option keys: :content-types a set of strings matching the content types :accept-types a set of strings mactching accept types, ressolves in client preferred order :keywordize? a boolean specifying whether to keywordize the parsed JSON request body :transit-opts a map containing transit configuration options of the form {:reader {:type ... :opts ...} :writer {:type ... :opts ...} where :type and :opts are exactly as defined in the transit spec
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close