Class HeaderDictionaryExtensions
Extension methods for the Microsoft.AspNetCore.Http.IHeaderDictionary interface.
Inheritance
System.Object
HeaderDictionaryExtensions
Namespace: Cuemon.AspNetCore.Http
Assembly: Cuemon.AspNetCore.dll
Syntax
public static class HeaderDictionaryExtensions
Methods
| Improve this DocAddOrUpdateHeader(IHeaderDictionary, String, StringValues, Boolean)
Adds or updates an element with the provided key and value to the Microsoft.AspNetCore.Http.IHeaderDictionary.
Declaration
public static void AddOrUpdateHeader(this IHeaderDictionary dic, string key, StringValues value, bool useAsciiEncodingConversion = true)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Http.IHeaderDictionary | dic | The Microsoft.AspNetCore.Http.IHeaderDictionary to extend. |
| System.String | key | The string to use as the key of the element to add. |
| Microsoft.Extensions.Primitives.StringValues | value | The string to use as the value of the element to add. |
| System.Boolean | useAsciiEncodingConversion | if set to |
AddOrUpdateHeaders(IHeaderDictionary, HttpResponseHeaders)
Adds or updates one or more elements from the provided collection of responseHeaders to the Microsoft.AspNetCore.Http.IHeaderDictionary.
Declaration
public static void AddOrUpdateHeaders(this IHeaderDictionary dic, HttpResponseHeaders responseHeaders)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Http.IHeaderDictionary | dic | The Microsoft.AspNetCore.Http.IHeaderDictionary to extend. |
| System.Net.Http.Headers.HttpResponseHeaders | responseHeaders | The System.Net.Http.Headers.HttpResponseHeaders to copy. |