例如,我在Firefox中键入“ stackoverflow.com”。
我知道我正在发送HTTP GET请求。但是,响应中实际的HTML标记在哪里?是否在特定的标头(如content-type)中?还是位于其他地方?
谢谢。
HTTP响应具有以下数据:
HTML在响应正文中
HTML是响应正文。
Hypertext_Transfer_Protocol, wiki中有一个例子
Web Broswer阅读响应消息。
HTTP/1.1 200 OK
Date: Mon, 23 May 2005 22:38:34 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 138
Last-Modified: Wed, 08 Jan 2003 23:11:55 GMT
Server: Apache/1.3.3.7 (Unix) (Red-Hat/Linux)
ETag: "3f80f-1b6-3e1cb03b"
Accept-Ranges: bytes
Connection: close
<html>
<head>
<title>An Example Page</title>
</head>
<body>
<p>Hello World, this is a very simple HTML document.</p>
</body>
</html>