HeaderDictionaryExtensions Class

Definition

Contains extension methods for modifying an IHeaderDictionary instance.

C#
public static class HeaderDictionaryExtensions
Inheritance
HeaderDictionaryExtensions

Methods

Append(IHeaderDictionary, String, StringValues)

Add new values. Each item remains a separate array entry.

AppendCommaSeparatedValues(IHeaderDictionary, String, String[])

Quotes any values containing commas, and then comma joins all of the values with any existing values.

GetCommaSeparatedValues(IHeaderDictionary, String)

Get the associated values from the collection separated into individual values. Quoted values will not be split, and the quotes will be removed.

SetCommaSeparatedValues(IHeaderDictionary, String, String[])

Quotes any values containing commas, and then comma joins all of the values.

Applies to

Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0