Table of Contents

AddOrUpdateLastModifiedHeader Method

Definition

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

decorator IDecorator<HttpResponse>

The IDecorator<T> to extend.

request HttpRequest

An instance of the 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.