AddOrUpdateHeader Method
Definition
- Namespace
- Cuemon.Extensions.AspNetCore.Http
- Assemblies
- Cuemon.Extensions.AspNetCore.dll
AddOrUpdateHeader(IHeaderDictionary, string, StringValues, bool)
Attempts to add or update an existing element with the provided key and value to the IHeaderDictionary.
public static void AddOrUpdateHeader(this IHeaderDictionary dictionary, string key, StringValues value, bool useAsciiEncodingConversion = true)
Parameters
dictionaryIHeaderDictionaryThe IHeaderDictionary to extend.
keystringThe string to use as the key of the element to add.
valueStringValuesThe string to use as the value of the element to add.
useAsciiEncodingConversionboolif set to
truean ASCII encoding conversion is applied to thevalue.