class Artifactory::Client
def build_uri(verb, path, params = {})
-
(URI)
-
Parameters:
-
params
(Hash
) -- -
path
(String
) -- -
verb
(Symbol
) --
def build_uri(verb, path, params = {}) # Add any query string parameters if [:delete, :get].include?(verb) path = [path, to_query_string(params)].compact.join("?") end # Parse the URI uri = URI.parse(path) # Don't merge absolute URLs uri = URI.parse(File.join(endpoint, path)) unless uri.absolute? # Return the URI object uri end