ring-middleware-format
ring-middleware-format copied to clipboard
If response map has content-type set, don't override or something
Sometimes user needs to return json as text/plain type (because IE9).
This works:
(-> (ok (cheshire.core/generate-string {:ping "pong"}))
(content-type "text/plain"))
Source: https://github.com/metosin/ring-middleware-format/issues/5
Somewhat related: https://github.com/ngrunwald/ring-middleware-format/commit/6f2930789c1bf43c4001bc4fb19fcab284884a99 and https://github.com/ngrunwald/ring-middleware-format/issues/32