我收到一个用jwt编码的json对象,在中间件中我想在解码消息之后构建post params
params = JSON.parse(env['rack.input'].read)
json_decoded = decode_data(params['data'], secret_key)
puts "DECODED: #{json_decoded[0]}"
env["rack.input"] = StringIO.new(json_decoded[0].to_s)
>>> CODE HERE
status, headers, response = @app.call(env)
[status, headers, response]
在控制台上
{" name" =>" xyz"," description" =>" xyz"}
ActionDispatch :: Http :: Parameters :: ParseError(822:意外的令牌在' {"名称" =>" xyz","说明&# 34; =>" XYZ"}&#39):
如何建立传递给铁轨的邮政参数