62,271
社区成员
发帖
与我相关
我的任务
分享
public static void main(String[] args) throws Exception {
URL url = new URL("http://shua.zhuzhuxc.com/login.aspx");
HttpURLConnection urlConnection = (HttpURLConnection) url.openConnection();
Map map = urlConnection.getHeaderFields();
Set ks = map.keySet();
for (Iterator iterator = ks.iterator(); iterator.hasNext();) {
String key = (String) iterator.next();
System.out.println(key+":"+map.get(key));
}
}