HttpURLConnection
的跟随重定向仅是一个指标,实际上它不能帮助您进行“真正的” http重定向,您仍然需要手动处理它。
URL obj = new URL(url);
HttpURLConnection conn = (HttpURLConnection) obj.openConnection();
conn.setInstanceFollowRedirects(true); //you still need to handle redi
HttpURLConnection
的跟随重定向仅是一个指标,实际上它不能帮助您进行“真正的” http重定向,您仍然需要手动处理它。
URL obj = new URL(url);
HttpURLConnection conn = (HttpURLConnection) obj.openConnection();
conn.setInstanceFollowRedirects(true); //you still need to handle redi