curl -v https://whatwg.org/html
标题是:
HTTP / 1.1 301永久移动
地点:https://html.spec.whatwg.org/multipage
然而..
String link = "https://whatwg.org/html";
URL url = new URL(link);
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
int status = conn.getResponseCode();
System.out.println("Response Code ... " + status);
响应代码... 200
第一个和第二个结果是不同的,我做错了什么以及我应该如何收到301?