C# HttpClient: Why MediaTypeWithQualityHeaderValue?

帅比萌擦擦* 提交于 2019-12-10 17:18:42

问题


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'?


回答1:


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



来源:https://stackoverflow.com/questions/42007325/c-sharp-httpclient-why-mediatypewithqualityheadervalue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!