Used for simple response middleware.
# File lib/faraday/response.rb, line 7 def call(env) @app.call(env).on_complete do |environment| on_complete(environment) end end
Override this to modify the environment after the response has finished. Calls the `parse` method if defined
# File lib/faraday/response.rb, line 15 def on_complete(env) if respond_to? :parse env[:body] = parse(env[:body]) unless [204,304].index env[:status] end end