edge badge
Namespace
Methods
C
N
Constants
DEFAULT_PARSERS = { Mime::JSON => lambda { |raw_post| data = ActiveSupport::JSON.decode(raw_post) data = {:_json => data} unless data.is_a?(Hash) Request::Utils.normalize_encode_params(data) } }
 
Class Public methods
new(app, parsers = {})
# File actionpack/lib/action_dispatch/middleware/params_parser.rb, line 24
def initialize(app, parsers = {})
  @app, @parsers = app, DEFAULT_PARSERS.merge(parsers)
end
Instance Public methods
call(env)
# File actionpack/lib/action_dispatch/middleware/params_parser.rb, line 28
def call(env)
  default = env["action_dispatch.request.request_parameters"]
  env["action_dispatch.request.request_parameters"] = parse_formatted_parameters(env, @parsers, default)

  @app.call(env)
end