class Faraday::Response::Middleware
Used for simple response middleware.
Public Instance Methods
Source
# File lib/faraday/response.rb, line 10 def call(env) @app.call(env).on_complete do |environment| on_complete(environment) end end
Source
# File lib/faraday/response.rb, line 19 def on_complete(env) return unless respond_to?(:parse, true) && env.parse_body? env.body = parse(env.body) end
Override this to modify the environment after the response has finished. Calls the ‘parse` method if defined `parse` method can be defined as private, public and protected