AddResponseHeaders Method
Definition
- Namespace
- Cuemon.AspNetCore.Http
- Assemblies
- Cuemon.AspNetCore.dll
AddResponseHeaders<T>(IDecorator<T>, IHeaderDictionary)
Adds all non-existing headers to the enclosed HttpStatusCodeException of the decorator.
public static IDecorator<T> AddResponseHeaders<T>(this IDecorator<T> decorator, IHeaderDictionary headers) where T : HttpStatusCodeException
Parameters
decoratorIDecorator<T>The IDecorator<T> to extend.
headersIHeaderDictionaryThe IHeaderDictionary to populate into the enclosed HttpStatusCodeException.
Returns
- IDecorator<T>
Type Parameters
T
Exceptions
- ArgumentNullException
decoratorcannot be null -or-headerscannot be null.
AddResponseHeaders<T>(IDecorator<T>, HttpResponseHeaders)
Adds all non-existing headers to the enclosed HttpStatusCodeException of the decorator.
public static IDecorator<T> AddResponseHeaders<T>(this IDecorator<T> decorator, HttpResponseHeaders headers) where T : HttpStatusCodeException
Parameters
decoratorIDecorator<T>The IDecorator<T> to extend.
headersHttpResponseHeadersThe HttpResponseHeaders to populate into the enclosed HttpStatusCodeException.
Returns
- IDecorator<T>
Type Parameters
T
Exceptions
- ArgumentNullException
decoratorcannot be null -or-headerscannot be null.