# File cas.rb, line 92 def request_cas_response(uri, type) log.debug "Requesting CAS response form URI #{uri.inspect}" uri = URI.parse(uri) unless uri.kind_of? URI https = Net::HTTP.new(uri.host, uri.port) https.use_ssl = (uri.scheme == 'https') raw_res = https.start do |conn| conn.get("#{uri.path}?#{uri.query}") end # TODO: check to make sure that response code is 200 and handle errors # otherwise RAILS_DEFAULT_LOGGER.debug "CAS Responded with " + "#{raw_res.inspect}:\n#{raw_res.body}" unless not defined? RAILS_DEFAULT_LOGGER type.new(raw_res.body) end