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

Add ability to require certain param types #59

Closed
vladfaust opened this issue Feb 22, 2019 · 0 comments
Closed

Add ability to require certain param types #59

vladfaust opened this issue Feb 22, 2019 · 0 comments
Assignees
Milestone

Comments

@vladfaust
Copy link
Member

vladfaust commented Feb 22, 2019

  params do
    json require: true do
      type content : String
    end
  end

Would return 400 JSON payload required if content type is not "application/json" or the body is missing.

It is useful for applications which work with JSON requests only.

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

No branches or pull requests

1 participant