Table of Contents

Class HttpResponseDecoratorExtensions

Namespace
Cuemon.AspNetCore.Http
Assembly
Cuemon.AspNetCore.dll

Extension methods for the Microsoft.AspNetCore.Http.HttpResponse class hidden behind the IDecorator<T> interface.

public static class HttpResponseDecoratorExtensions
Inheritance
HttpResponseDecoratorExtensions

Methods

AddOrUpdateEntityTagHeader(IDecorator<HttpResponse>, HttpRequest, ChecksumBuilder, Boolean)

Attempts to add or update the enclosed Microsoft.AspNetCore.Http.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

decorator IDecorator<HttpResponse>

The IDecorator<T> to extend.

request HttpRequest

An instance of the Microsoft.AspNetCore.Http.HttpRequest object.

builder ChecksumBuilder

A ChecksumBuilder that represents the integrity of the client.

isWeak Boolean

A value that indicates if this entity-tag header is a weak validator.

Exceptions

ArgumentNullException

decorator cannot be null -or- request cannot be null -or- builder cannot be null.

AddOrUpdateLastModifiedHeader(IDecorator<HttpResponse>, HttpRequest, DateTime)

Attempts to add or update the enclosed Microsoft.AspNetCore.Http.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

decorator IDecorator<HttpResponse>

The IDecorator<T> to extend.

request HttpRequest

An instance of the Microsoft.AspNetCore.Http.HttpRequest object.

lastModified DateTime

A value that represents when the resource was either created or last modified.

Exceptions

ArgumentNullException

decorator cannot be null -or- request cannot be null.

See Also