module Faraday::MiddlewareRegistry

def lookup_middleware(key)

Raises:
  • (Faraday::Error) - if given key is not registered

Returns:
  • (Class) - a middleware Class.

Parameters:
  • key (Symbol) -- key for the registered middleware.
def lookup_middleware(key)
  load_middleware(key) ||
    raise(Faraday::Error, "#{key.inspect} is not registered on #{self}")
end