iT邦幫忙

2017 iT 邦幫忙鐵人賽
DAY 25
0
自我挑戰組

我的月薪嬌妻:HTTP系列 第 25

Day25-Accept系列

出現在請求標頭當中,蘊含客戶端可處理的MIME-type有哪些並針對MIME-type加上一些權重的標示,以分號區隔,範圍域介於0到1之間,預設值為1

GET /ironman?tab=hot HTTP/1.1
Host: ithelp.ithome.com.tw
Connection: keep-alive
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.87 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding: gzip, deflate, sdch
Accept-Language: zh-TW,zh;q=0.8,en-US;q=0.6,en;q=0.4,pt;q=0.2
Cookie: (略)

以第8屆鐵人賽熱門文章頁面來看,可處理的MIME-type有text/html、application/xhtml+xml、application/xml、image/webp和*//*代表任意的MIME-type。

text/html、application/xhtml+xml、image/webp權重為1.0;application/xml權重為0.9;*/*權重為0.8。


上一篇
Day24-回覆的年齡-Age
下一篇
Day26-Accept系列
系列文
我的月薪嬌妻:HTTP30
圖片
  直播研討會
圖片
{{ item.channelVendor }} {{ item.webinarstarted }} |
{{ formatDate(item.duration) }}
直播中

尚未有邦友留言

立即登入留言