Sha256: 81b72bf3f69dc47cb6346b623697f3d4288efc9d067fd116d1b42c7d4932c8b0
Contents?: true
Size: 688 Bytes
Versions: 12
Compression:
Stored size: 688 Bytes
Contents
rad.http # # Outdated, Rack does this by themself, keeping it just in case. # class PrepareParams < Rad::Conveyors::Processor def call workspace.env.must_be.defined workspace.request = Rad::Http::Request.new(workspace.env) workspace.path = workspace.request.path params = workspace.params = Rad::Conveyors::Params.new(workspace.request.params) if params.json? json_params = JSON.load params['json'] json_params.must_be.a Hash json_params.keys.each do |k| logger.warn "RAD parameter :#{k} will be overwriden from JSON!" if params.include?(k) end params.merge! json_params end next_processor.call end end
Version data entries
12 entries across 12 versions & 1 rubygems