具有多个值的 Accept Header 中是否需要权重值?
Are weight values required in an Accept Header with multiple values?
根据规范,HTTP Accept header 可以有多个值,如下所示:
Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8
我的问题是:具有多个值的 Accept headers 需要至少有一个权重吗?或者如果 none 的内容类型具有权重,它们是否仍然有效?
换句话说,根据规范,这个 Accept header 仍然有效吗?
Accept: text/html, application/xhtml+xml, application/xml, */*
提前致谢!
质量值是可选的,但每个条目都有一个隐含的质量值 1。
https://developer.mozilla.org/en-US/docs/Glossary/Quality_values
The importance of a value is marked by the suffix ';q=' immediately followed by a value between 0 and 1 included, with up to three decimal digits, the highest value denoting the highest priority. When not present, the default value is 1.
根据规范,HTTP Accept header 可以有多个值,如下所示:
Accept: text/html, application/xhtml+xml, application/xml;q=0.9, */*;q=0.8
我的问题是:具有多个值的 Accept headers 需要至少有一个权重吗?或者如果 none 的内容类型具有权重,它们是否仍然有效?
换句话说,根据规范,这个 Accept header 仍然有效吗?
Accept: text/html, application/xhtml+xml, application/xml, */*
提前致谢!
质量值是可选的,但每个条目都有一个隐含的质量值 1。
https://developer.mozilla.org/en-US/docs/Glossary/Quality_values
The importance of a value is marked by the suffix ';q=' immediately followed by a value between 0 and 1 included, with up to three decimal digits, the highest value denoting the highest priority. When not present, the default value is 1.