# File lib/universal_ruby_whois/server.rb, line 152
    def raw_response(domain)
      return nil if unavailable?
      return @response_cache[domain] if !@response_cache[domain].blank?
      @response_cache[domain] = ""
      if nic_server.kind_of?(Array)
        interpolate_vars = {
          '%DOMAIN%' => domain,
          '%DOMAIN_NO_TLD%' => domain.gsub(/\.#{tld.to_s}$/i, ''),
          '%TLD%' => tld
          }

        url = URI.parse(nic_server.first.dup.interpolate(interpolate_vars))
        method = nic_server[1] || :post
        req = "Net::HTTP::#{method.to_s.capitalize}".constantize.new(url.path)
        form_data = nic_server[2].dup || {}
        form_data.each { |k,v| form_data[k] = v.interpolate(interpolate_vars) }
        req.set_form_data(form_data)
        res = begin
          Net::HTTP.new(url.host, url.port).start {|http| http.request(req) }
        rescue Net::HTTPBadResponse
          nil # Ignore these for now...
        end
        @response_cache[domain] = case res
        when Net::HTTPSuccess, Net::HTTPRedirection
          res.body
        else
          ''
        end
      elsif nic_server.to_s =~ /^http/
        url = nic_server.gsub(/\%DOMAIN\%/, domain)
        @response_cache[domain] = Net::HTTP.get_response(URI.parse(url)).body
      else
        command = "#{WHOIS_BIN} #{('-h ' + @nic_server) unless @nic_server.blank?} #{self.class.shell_escape(domain)} 2>&1"
        @response_cache[domain] = Whois::Server.run_command_with_timeout(command, 10, true)
      end
      if match = regexes[:server_unavailable].match_with_inversion(@response_cache[domain])
        @server_unavailable = true
        @unavailable_response = match[1]
        nil
      else
        @response_cache[domain]
      end
    end