C#HttpClient:为什么选择MediaTypeWithQualityHeaderValue? [英] C# HttpClient: Why MediaTypeWithQualityHeaderValue?

查看:614
本文介绍了C#HttpClient:为什么选择MediaTypeWithQualityHeaderValue?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试在请求上设置 Content-Type标头属性时,MediaTypeWithQualityHeaderValue参数的用途是什么? MSDN文档简单声明:

What is the purpose of the MediaTypeWithQualityHeaderValue parameter when attempting to set the "Content-Type" header property on a request? The MSDN documentation simply states:


表示具有附加质量的内容类型标头值。

Represents a content-type header value with an additional quality.

附加质量的具体含义是什么?

What specifically is meant by 'an additional quality'?

推荐答案

目的是遵守HTTP标准,该标准在3.9节中定义了质量值。您可以在RFC 2616中进一步了解它。这是一个链接: http:/ /www.w3.org/Protocols/rfc2616/rfc2616-sec3.html

The purpose is to comply with the HTTP standard, which under section 3.9 defines quality values. You can read further about it in RFC 2616. Here is a link : http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html

这篇关于C#HttpClient:为什么选择MediaTypeWithQualityHeaderValue?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆