Microsoft.AspNetCore.Http.Abstractions by Microsoft

<PackageReference Include="Microsoft.AspNetCore.Http.Abstractions" Version="2.0.0" />

 HeaderDictionaryExtensions

public static class HeaderDictionaryExtensions
public static void Append(this IHeaderDictionary headers, string key, StringValues value)

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

public static void AppendCommaSeparatedValues(this IHeaderDictionary headers, string key, string[] values)

Quotes any values containing comas, and then coma joins all of the values with any existing values.

public static string[] GetCommaSeparatedValues(this IHeaderDictionary headers, string key)

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

public static void SetCommaSeparatedValues(this IHeaderDictionary headers, string key, string[] values)

Quotes any values containing comas, and then coma joins all of the values.