class Faraday::Response::Middleware
Used for simple response middleware.
def call(env)
def call(env) @app.call(env).on_complete do |environment| on_complete(environment) end end
def on_complete(env)
Override this to modify the environment after the response has finished.
def on_complete(env) env.body = parse(env.body) if respond_to?(:parse) && env.parse_body? end