(best-match match-fn parsed-accept-maps)
(best-match-fn supported-type-strs)
(negotiate-content supported-type-strs)
(negotiate-content supported-type-strs opts-map)
Given a vector of strings (supported types mime-types) and
optionally a map of additional options,
return an interceptor that will parse client-request response formats,
and add an :accept
key on the request, of the most acceptable response format.
The format of the :accept
value is a map containing :field, :type, and :subtype - all strings
Additional options: :no-match-fn - A function that takes a context; Called when no acceptable format/mime-type is found :content-param-paths - a vector of vectors; paths into the context to find 'accept' format strings
Given a vector of strings (supported types mime-types) and optionally a map of additional options, return an interceptor that will parse client-request response formats, and add an `:accept` key on the request, of the most acceptable response format. The format of the `:accept` value is a map containing :field, :type, and :subtype - all strings Additional options: :no-match-fn - A function that takes a context; Called when no acceptable format/mime-type is found :content-param-paths - a vector of vectors; paths into the context to find 'accept' format strings
(parse-accept-* accept-str)
(parse-accept-element accept-elem-str)
(weighted-accept-qs supported-types accept-elem)
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close