(content-type-response response request)
(content-type-response response request options)
Adds a content-type header to response. See: wrap-content-type.
Source
(defn content-type-response
"Adds a content-type header to response. See: wrap-content-type."
{:added "1.2"}
([response request]
(content-type-response response request {}))
([response request options]
(if response
(if (get-header response "Content-Type")
response
(let [mime-type (ext-mime-type (:uri request) (:mime-types options))]
(content-type response (or mime-type "application/octet-stream")))))))