Skip to content

Latest commit

 

History

History
21 lines (14 loc) · 836 Bytes

README.rdoc

File metadata and controls

21 lines (14 loc) · 836 Bytes

Welcome to Parsnip

Parsnip is a rack middlware component primarily targeted to Rails 3.x developers creating RESTful apis. Particularly those tired of ActionDispatch::ParamsParser spewing internal server errors when clients supply malformed XML or JSON in the body of PUT/POST requests. Parsnip will find unparsable XML or JSON and return response with a status code of 400 and JSON or XML body content describing the parsing error encountered.

Getting Started

Rails: Parsnip uses the railties facility to work as a plug and play gem for Rails applications (verified with Rails 3.2.x).

  1. Add gem 'parsnip' to your Gemfile

  2. Run bundle from your project root

  3. Run rake middleware from your project root and verify that Parsnip::Middleware appears before ActionDispatch::ParamsParser