def request(method, path, &block)
      uri_string = Config.artifactory.strip
      # Make sure we end up with the right number of separators.
      uri_string << '/' unless uri_string.end_with?('/')
      uri_string << path
      uri = URI(uri_string)
      request = Net::HTTP.const_get(method.to_s.capitalize).new(uri)
      request['X-Jfrog-Art-Api'] = Config.artifactory_key.strip
      block.call(request) if block
      connection.request(request)
    end
def request(method, path, &block)
      uri_string = Config.artifactory.strip
      # Make sure we end up with the right number of separators.
      uri_string << '/' unless uri_string.end_with?('/')
      uri_string << path
      uri = URI(uri_string)
      request = Net::HTTP.const_get(method.to_s.capitalize).new(uri)
      request['X-Jfrog-Art-Api'] = Config.artifactory_key.strip
      block.call(request) if block
      connection.request(request)
    end
Send an HTTP request to the Artifactory server.

 @param [Symbol] method
   HTTP method to use

 @param [String] path
   URI path to request

 @param [Proc] block
   Optional block to set request values

 @return [Net::HTTPResponse]