http协议-http请求
http请求由三部分组成,分别是:请求行、消息报头、请求正文
1.请求行
POST / HTTP/1.1
GET /favicon.ico HTTP/1.1
2.消息报头
Host: localhost:8888
Connection: keep-alive
Content-Length: 24
Cache-Control: max-age=0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Origin: http://localhost:8888
User-Agent: Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1500.72 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Referer: http://localhost:8888/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: zh-CN,zh;q=0.8
Cookie: TailorID=c91d70cf175f5143ce1ba7517103277ddf26; CNZZDATA1000004729=1824251126-1385042583-http%253A%252F%252Flocalhost%7C1385084292
3.请求正文
name=11111&submit=submit
<html><body><form action=\"http://localhost:8888\" method=\"post\"><input type=\"text\" name=\"name\"/><input type=\"submit\" name=\"submit\" value=\"submit\"/></form></body></html>