Class HttpResponseDecoratorExtensions
- Namespace
- Cuemon.AspNetCore.Http
- Assembly
- Cuemon.AspNetCore.dll
Extension methods for the HttpResponse class hidden behind the IDecorator<T> interface.
public static class HttpResponseDecoratorExtensions
- Inheritance
-
HttpResponseDecoratorExtensions
Methods
AddOrUpdateEntityTagHeader(IDecorator<HttpResponse>, HttpRequest, ChecksumBuilder, bool)
Attempts to add or update the enclosed HttpResponse of the decorator with the necessary HTTP response headers needed to provide entity tag header information.
public static void AddOrUpdateEntityTagHeader(this IDecorator<HttpResponse> decorator, HttpRequest request, ChecksumBuilder builder, bool isWeak = false)
Parameters
decoratorIDecorator<HttpResponse>The IDecorator<T> to extend.
requestHttpRequestAn instance of the HttpRequest object.
builderChecksumBuilderA ChecksumBuilder that represents the integrity of the client.
isWeakboolA value that indicates if this entity-tag header is a weak validator.
Exceptions
- ArgumentNullException
decoratorcannot be null -or-requestcannot be null -or-buildercannot be null.
AddOrUpdateLastModifiedHeader(IDecorator<HttpResponse>, HttpRequest, DateTime)
Attempts to add or update the enclosed HttpResponse of the decorator with the necessary HTTP response headers needed to provide last-modified information.
public static void AddOrUpdateLastModifiedHeader(this IDecorator<HttpResponse> decorator, HttpRequest request, DateTime lastModified)
Parameters
decoratorIDecorator<HttpResponse>The IDecorator<T> to extend.
requestHttpRequestAn instance of the HttpRequest object.
lastModifiedDateTimeA value that represents when the resource was either created or last modified.
Exceptions
- ArgumentNullException
decoratorcannot be null -or-requestcannot be null.