def api_get_request(url_prefix, tree = nil, url_suffix ="/api/json",
                        raw_response = false)
      url_prefix = "#{@jenkins_path}#{url_prefix}"
      to_get = ""
      if tree
        to_get = "#{url_prefix}#{url_suffix}?#{tree}"
      else
        to_get = "#{url_prefix}#{url_suffix}"
      end
      request = Net::HTTP::Get.new(to_get)
      @logger.debug "GET #{to_get}"
      response = make_http_request(request)
      if raw_response
        handle_exception(response, "raw")
      else
        handle_exception(response, "body", url_suffix =~ /json/)
      end
    end
def api_get_request(url_prefix, tree = nil, url_suffix ="/api/json",
                        raw_response = false)
      url_prefix = "#{@jenkins_path}#{url_prefix}"
      to_get = ""
      if tree
        to_get = "#{url_prefix}#{url_suffix}?#{tree}"
      else
        to_get = "#{url_prefix}#{url_suffix}"
      end
      request = Net::HTTP::Get.new(to_get)
      @logger.debug "GET #{to_get}"
      response = make_http_request(request)
      if raw_response
        handle_exception(response, "raw")
      else
        handle_exception(response, "body", url_suffix =~ /json/)
      end
    end
Sends a GET request to the Jenkins CI server with the specified URL

 @param [String] url_prefix The prefix to use in the URL
 @param [String] tree A specific JSON tree to optimize the API call
 @param [String] url_suffix The suffix to be used in the URL
 @param [Boolean] raw_response Return complete Response object instead of
   JSON body of response

 @return [String, Hash] JSON response from Jenkins