-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Define a single format (or specific formats) #178
Comments
Make sure to have |
Just wanted to pop in here and second this, specifically because it appears XML serialization is borked when responding with an entity, it just shows .to_s of the entity class and doesn't serialize it. |
+1 I need only json-support and don't know how to disable xml and txt formatting... |
as a workaround i'll validate the request in a before_filter like:
|
I've committed 733f7df which resets default content types when you call JSON-only API (everything else returns 406) format :json
content_type :json, "application/json" Both JSON and XML, default JSON. format :json
content_type :json, "application/json"
content_type :xml, "application/xml" |
👌 |
What if I want to access only
JSON
? I dont wantXML
to be available or whatever!The text was updated successfully, but these errors were encountered: