module Faraday::Utils
def URI(url) # rubocop:disable Naming/MethodName
Returns a parsed URI.
url - A String or URI.
Normalize URI() behavior across Ruby versions
def URI(url) # rubocop:disable Naming/MethodName if url.respond_to?(:host) url elsif url.respond_to?(:to_str) default_uri_parser.call(url) else raise ArgumentError, 'bad argument (expected URI object or URI string)' end end