JTW
JTW

Reputation: 3705

C# HttpClient: Why MediaTypeWithQualityHeaderValue?

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

Upvotes: 6

Views: 9169

Answers (1)

Qyaffer
Qyaffer

Reputation: 220

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

Upvotes: 6

Related Questions