def do_get(uri = "", query: {}, headers: {}, n_http: false)
      url_query = query.size > 0 ? "?" + query.map {|k, v| "#{k}=#{v}"}.join("&") : ""
      Timeout.timeout(@timeout) do
        con = n_http ? @connection_net_http : @connection
        con.get do |req|
          req.url(uri + url_query)
          headers.map { |key, value| req.headers[key] = value }
        end
      end
    rescue Faraday::Error::ConnectionFailed, Timeout::Error => e
      msg = "Error trying to send a GET to #{uri + url_query} "\
            "the reason: #{e.message}"
      $lxca_log.error(HEADER_MESSAGE + ' do_get', msg)
      Faraday::Response.new
    end
def do_get(uri = "", query: {}, headers: {}, n_http: false)
      url_query = query.size > 0 ? "?" + query.map {|k, v| "#{k}=#{v}"}.join("&") : ""
      Timeout.timeout(@timeout) do
        con = n_http ? @connection_net_http : @connection
        con.get do |req|
          req.url(uri + url_query)
          headers.map { |key, value| req.headers[key] = value }
        end
      end
    rescue Faraday::Error::ConnectionFailed, Timeout::Error => e
      msg = "Error trying to send a GET to #{uri + url_query} "\
            "the reason: #{e.message}"
      $lxca_log.error(HEADER_MESSAGE + ' do_get', msg)
      Faraday::Response.new
    end
@param [Hash] configuration - the data to create a connection with the LXCA
 @option configuration [String] :host             the LXCA host
 @option configuration [String] :username         the LXCA username
 @option configuration [String] :password         the username password
 @option configuration [String] :port             the LXCA port
 @option configuration [String] :auth_type        the type of the authentication ('token', 'basic_auth')
 @option configuration [String] :verify_ssl       ('PEER', 'NONE')
 @option configuration [String] :user_agent_label Api gem client identification
 @option configuration [String] :timeout          the limit time in seconds

 Does a GET request to an LXCA endpoint

 @param [String] uri - endpoint to do the request
 @param [Hash] query - params to query the endpoint resources
 @param [Hash] headers - add headers to the request