mirror of
https://github.com/lostisland/faraday.git
synced 2025-10-08 00:03:41 -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
|
yield conn
|
||||||
end
|
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)
|
def call(env)
|
||||||
env.clear_body if env.needs_body?
|
env.clear_body if env.needs_body?
|
||||||
env.response = Response.new
|
env.response = Response.new
|
||||||
|
Loading…
x
Reference in New Issue
Block a user