Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Robust Params Parser by Infopark Infopark

Params parser Rack middleware able to handle parsing errors. Temporary workaround for rails/rails#7424

For Rails 3 only. As of Rails 4 this workaround is obsolete.

Installation

  # In your Gemfile
  gem 'robust_params_parser'

  # In your config/application.rb
  config.middleware.swap ActionDispatch::ParamsParser, ::RobustParamsParser, {}

Usage

Just make a POST with Content-Type 'application/json' and an invalid JSON as payload, which will result in a 400 status code and an empty body response.

Caveats

Only works if you're using MultiJson.

License

LGPG-3.0 License. Copyright 2013 Infopark AG. http://www.infopark.com

About

No description, website, or topics provided.

Resources

Stars

1 star

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages