-
Notifications
You must be signed in to change notification settings - Fork 150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Correct way to set custom Content-Type for responses? #236
Comments
Hi. Currently, you can do this by creating a custom formatter for the (api
{:format {:formats [my-custom-json-formatter :edn ....]}}
...) hope this helps. Should be much easier in future, about to rewrite r-m-f (async + faster). |
with |
But the root-cause is here: ngrunwald/ring-middleware-format#53. Before that is fixed, you could add a middleware outside of the |
closing this now. https://github.com/metosin/muuntaja will replace r-m-f soon. |
I'd like to set a custom
Content-Type
for responses, to be able eventually to use something likeapplication/vnd.foobar.v0+json
.I tried this:
But the Content-Type header just disappears:
After seeing #235 I tried to set
:format
to{:formats []}
, but it made no different. Not sure how #108 plays into this.https://github.com/metosin/compojure-api/wiki/Swagger-integration says:
But doesn't mention how to depart from the default.
I'm using compojure-api 1.1.3.
Is this supported?
The text was updated successfully, but these errors were encountered: