- In rails, can I access response.body in a action before it returns?
- module Dump
- require 'rack'
- class Response
- def initialize(app)
- @app=app
- end
- def call(env)
- res=@app.call(env)
- res.body #change this and but also update res.length and header["Content-Length"]
- return res
- end
- end
- end
- use Dump::Response