class VCR::Middleware::Faraday
Faraday
middleware that VCR
uses to record and replay HTTP requests made through Faraday
.
@note You can either insert this middleware into the Faraday
middleware stack
yourself or configure {VCR::Configuration#hook_into} to hook into `:faraday`.
Public Class Methods
new(app)
click to toggle source
Constructs a new instance of the Faraday
middleware.
@param [#call] app the faraday app
Calls superclass method
VCR::Deprecations::Middleware::Faraday::new
# File lib/vcr/middleware/faraday.rb, line 21 def initialize(app) super @app = app end
Public Instance Methods
call(env)
click to toggle source
close()
click to toggle source
Close any persistent connections.
# File lib/vcr/middleware/faraday.rb, line 35 def close @app.close if @app.respond_to?(:close) end