HTTP: The Definitive Guide

17.3.2 Content-Negotiation Header Quality Values
The HTTP protocol defines quality values to allow clients to list multiple choices for each category of
preference and associate an order of preference with each choice. For example, clients can send an
Accept-Language header of the form:
Accept-Language: en;q=0.5, fr;q=0.0, nl;q=1.0, tr;q=0.0
Where the q values can range from 0.0 to 1.0 (with 0.0 being the lowest preference and 1.0 being the
highest). The header above, then, says that the client prefers to receive a Dutch (nl) version of the
document, but an English (en) version will do. Under no circumstances does the client want a French
(fr) or Turkish (tr) version, though. Note that the order in which the preferences are listed is not
important; only the q values associated with them are.
Occasionally, the server may not have any documents that match any of the client's preferences. In
this case, the server may change or transcode the document to match the client's preferences. This
mechanism is discussed later in this chapter.

Content-Negotiation Header Quality Values的更多相关文章

  1. WebApi2官网学习记录---Content Negotiation

    Content Negotiation的意思是:当有多种Content-Type可供选择时,选择最合适的一种进行序列化并返回给client. 主要依据请求中的Accept.Accept-Charset ...

  2. Spring MVC Content Negotiation 转载

    Spring MVC Content Negotiation 2017年11月15日 00:21:21 carl-zhao 阅读数:2983   Spring MVC有两种方式生成output的方法: ...

  3. Content Negotiation using Spring MVC

    There are two ways to generate output using Spring MVC: You can use the RESTful @ResponseBody approa ...

  4. Content Negotiation in ASP.NET Web API

    本文描述Web API实现内容协商(content negotiation). The HTTP specification (RFC 2616) defines content negotiatio ...

  5. the request doesn't contain a multipart/form-data or multipart/form-data stream, content type header

    the request doesn't contain a multipart/form-data or multipart/form-data stream, content type header ...

  6. Content Negotiation(内容协商)

    Asp.Net Web API 2第十四课——Content Negotiation(内容协商)   前言 阅读本文之前,您也可以到Asp.Net Web API 2 系列导航进行查看 http:// ...

  7. Asp.Net Web API 2第十四课——Content Negotiation(内容协商)

    前言 阅读本文之前,您也可以到Asp.Net Web API 2 系列导航进行查看 http://www.cnblogs.com/aehyok/p/3446289.html 本文描述ASP.NET W ...

  8. 浅析Content Negotation在Nancy的实现和使用

    背景介绍 什么是Content Negotation呢?翻译成中文的话就是"内容协商".当然,如果不清楚HTTP规范(RFC 2616)的话,可以对这个翻译也是一头雾水. 先来看看 ...

  9. http header cache-control (request和response区别)

    摘要:(1)网络服务会根据 request的header中的 cache-control策略设置response的cache-control策略 1 response cache-control 和 ...

随机推荐

  1. Android之ProGuard混淆器

    ProGuard是一个压缩.优化和混淆Java字节码文件的免费的工具,它可以删除无用的类.字段.方法和属性.可以删除没用的注释,最大限度地优化字节码文件.它还可以使用简短的无意义的名称来重命名已经存在 ...

  2. layoutSubviews什么时候触发调用

    ios layout机制相关方法 - (CGSize)sizeThatFits:(CGSize)size - (void)sizeToFit ——————- - (void)layoutSubview ...

  3. linux命令之fuser

    Usage: fuser [ -a | -s | -c ] [ -n SPACE ] [ -SIGNAL ] [ -kimuv ] NAME... [ - ] [ -n SPACE ] [ -SIGN ...

  4. Error C2280

    原因:默认参数用的assignment,而不是reference,要知道ostream并没有实现copy constructor/assignment operator(通过bing.com搜索Err ...

  5. github上搭建网站前台页面

    其实就是把html页面提交到github,为了能在线演示: 1. 首先在github网站找到你的项目 2. 点击设置 3. 找到这几个选项,选择master branch打钩,然后保存 4. 然后就会 ...

  6. 基于HTML5 Canvas 实现的 Loading 效果

    Sonic.js 是一个很小的 JavaScript 类,用于创建基于 HTML5 画布的加载图像.更强大的是 Sonic.js 还提供了基于现成的例子的创建工具,可以帮助你实现更多自定义的(Load ...

  7. Groovy学习()起步

    安装Groovy 在Windows环境下安装Groovy 下载安装包,傻瓜安装,设置环境目录,就这样搞定. 另外还需要安装Java并且设置JAVA_HOME环境变量. 两分钟搞定. 使用groovys ...

  8. Okra框架(一) 简介

    Okra是一个构建在Netty框架和Disruptor框架之上轻量级JAVA服务器框架. 使用Netty实现高性能,可灵活扩展的网络通信,使用Disruptor实现高吞吐量,低延迟的并发. Okra主 ...

  9. -/bin/sh: /usr/bin/xxx: not found”

    运行/usr/bin/helloworld命 令是提示“-/bin/sh: /usr/bin/helloworld: not found”,一开始我以为是helloworld没有运行权限,不过我给了它 ...

  10. EF应用一:Code First模式

    EF的核心程序集位于System.Data.Entity.dll和System.Data.EntityFramework.dll中.支持CodeFirst的位于EntityFramework.dll中 ...