用来描述客户端和服务端的数据交互
请求消息行:定义请求类型,请求的地址,http的版本号 请求消息头:定义请求的消息头 请求消息内容实体:消息的内容实体
POST http://www.baidu.com/ur/submit/urreward HTTP/1.1
Host: www.baidu.com
Connection: keep-alive
Content-Length: 412
Origin: http://www.baidu.com
X-Requested-With: XMLHttpRequest
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Accept: */*
Referer: http://www.baidu.com/s?wd=http%E5%8D%8F%E8%AE%AE&rsv_spt=1&issp=1&f=8&rsv_bp=0&rsv_idx=2&ie=utf-8&tn=baiduhome_pg&rsv_enter=0&rsv_pq=9ee40013000089f5&rsv_t=0ac4SWMebVX5TjRmjHHyNHdDixuCh%2FcpmFz8tPkwfArEbHonfYesWFV64Rr4%2F7VNDDnn&inputT=16437
Accept-Encoding: gzip, deflate
Accept-Language: zh-CN,zh;q=0.8
Cookie: BAIDUID=BECE0B98C5D5A8EA4C5A93221901CC58:FG=1; BAIDUPSID=BECE0B98C5D5A8EA4C5A93221901CC58; BDUSS=l1MmM3MEVEclRYR1RZc1ZJTnBDb2RBUTY1YktTUFc0a2pBYVlHNkxOZDk4N0JVQVFBQUFBJCQAAAAAAAAAAAEAAABoRLMjd2FuZ2Rha2U4ODgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAH1miVR9ZolUVm; cflag=65535%3A2; BD_HOME=1; BD_UPN=12314353; BDRCVFR[feWj1Vr5u3D]=I67x6TjHwwYf0; H_PS_645EC=ed505mET4I1deA3bYtMtRU3uR2cJjax8rhNPHTOm8z3DRr81YiRxdAGu2EkNN9FfIu%2Fm; BD_CK_SAM=1; BDSVRTM=89; H_PS_PSSID=8342_4398_10161_1461_10624_10571_10213_10500_10497_10016_10511_10644_10052_10459_10066_10219_9769_10463_10355_9094_10095_10008_10443_10460_10415_10360_9024_10627
bsToken=b22dd64be5811ede7970782c338fdead&asyn=1&info=pid%3Dse%26method%3Dsearch%26query%3Dhttp%25E5%258D%258F%25E8%25AE%25AE%2Fpid%3Daladdin%26resourceid%3D91%26fetchkey%3Dhttp%2525E5%25258D%25258F%2525E8%2525AE%2525AE%26method%3Dsearch%26query%3Dhttp%25E5%258D%258F%25E8%25AE%25AE%2Fpid%3Daladdin%26resourceid%3D1527%26fetchkey%3D%26method%3Dsearch%26query%3Dhttp%25E5%258D%258F%25E8%25AE%25AE&se=utf-8&ge=utf-8
响应状态行:定义响应的状态码 响应内容头:定义响应的消息头 响应内容实体:响应的内容实体
HTTP/1.1 200 OK
Cache-Control: private
Date: Sun, 14 Dec 2014 14:41:34 GMT
Expires: Sun, 14 Dec 2014 14:41:34 GMT
Content-type: text/html
Vary: Accept-Encoding
Content-Encoding: gzip
Transfer-Encoding: chunked
Server: BWS/1.0
Connection: Keep-Alive
后台任务是处理 及时性不高的任务,不需要耗用太多资源去做网络请求,UI也不是很关心数据返回