mirror of
https://github.com/lostisland/faraday.git
synced 2025-10-06 00:03:36 -04:00
Add Adapter#close
so that derived classes can call super. (#1091)
This commit is contained in:
parent
a53a4360e2
commit
15595d0370
@ -60,6 +60,13 @@ module Faraday
|
||||
yield conn
|
||||
end
|
||||
|
||||
# Close any persistent connections. The adapter should still be usable
|
||||
# after calling close.
|
||||
def close
|
||||
# Possible implementation:
|
||||
# @app.close if @app.respond_to?(:close)
|
||||
end
|
||||
|
||||
def call(env)
|
||||
env.clear_body if env.needs_body?
|
||||
env.response = Response.new
|
||||
|
Loading…
x
Reference in New Issue
Block a user