public static DidReturn304NotModified ( this httpReq, System.DateTime dateTime, IResponse httpRes ) : bool | ||
httpReq | this | |
dateTime | System.DateTime | |
httpRes | IResponse | |
return | bool |
public static bool DidReturn304NotModified(this IRequest httpReq, DateTime? dateTime, IResponse httpRes)
{
if (httpReq.HasNotModifiedSince(dateTime))
{
httpRes.StatusCode = (int)HttpStatusCode.NotModified;
return true;
}
return false;
}