Skip to content

Commit 0d0e5a3

Browse files
author
Luciana Pazos
committed
Make hyperclient compatible with 0.9.0
1 parent b48dbd7 commit 0d0e5a3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/faraday/request/digest_authentication.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -80,4 +80,6 @@ def header(response)
8080
end
8181

8282
# Register the middleware as a Request middleware with the name :digest
83-
Faraday.register_middleware :request, digest: Faraday::Request::DigestAuth
83+
registry = [Faraday, Faraday::Middleware].find{|mod| mod.respond_to?(:register_middleware)}
84+
raise "Could not find method register_middleware on Faraday or Faraday::Middleware" unless registry
85+
registry.register_middleware :request, digest: Faraday::Request::DigestAuth

0 commit comments

Comments
 (0)