Skip to content
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

Empty response body #215

Closed
bloudermilk opened this issue Jul 26, 2012 · 1 comment
Closed

Empty response body #215

bloudermilk opened this issue Jul 26, 2012 · 1 comment

Comments

@bloudermilk
Copy link

Is it possible to respond with no body? I've tried returning nil from my handlers but it returns null.

@dblock
Copy link
Member

dblock commented Jul 27, 2012

I think the problem is that you're trying to return JSON, and an empty body is not valid JSON. Set content-type to text/plain and you should be set with returning a nil.

Please ask questions on the ruby-grape google group.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants