ngrunwald / ring-middleware-format

Ring middleware for parsing parameters and emitting responses in JSON or other formats
163 stars 49 forks source link

If response map has content-type set, don't override or something #53

Open Deraen opened 8 years ago

Deraen commented 8 years ago

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

Deraen commented 8 years ago

Somewhat related: https://github.com/ngrunwald/ring-middleware-format/commit/6f2930789c1bf43c4001bc4fb19fcab284884a99 and https://github.com/ngrunwald/ring-middleware-format/issues/32