Class HttpRequestExtensions
Extension methods for the Microsoft.AspNetCore.Http.HttpRequest class.
Inheritance
Namespace: Cuemon.AspNetCore.Http
Assembly: Cuemon.AspNetCore.dll
Syntax
public static class HttpRequestExtensions
Methods
| Improve this DocIsClientSideResourceCached(HttpRequest, ChecksumBuilder)
Determines whether a cached version of the requested resource is found client-side using the If-None-Match HTTP header.
Declaration
public static bool IsClientSideResourceCached(this HttpRequest request, ChecksumBuilder builder)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.HttpRequest | request | An instance of the Microsoft.AspNetCore.Http.HttpRequest object. |
ChecksumBuilder | builder | A ChecksumBuilder that represents the integrity of the client. |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsClientSideResourceCached(HttpRequest, DateTime)
Determines whether a cached version of the requested resource is found client-side using the If-Modified-Since HTTP header.
Declaration
public static bool IsClientSideResourceCached(this HttpRequest request, DateTime lastModified)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.HttpRequest | request | An instance of the Microsoft.AspNetCore.Http.HttpRequest object. |
System.DateTime | lastModified | A System.DateTime value that represents the modification date of the content. |
Returns
Type | Description |
---|---|
System.Boolean |
|
IsGetOrHeadMethod(HttpRequest)
Determines whether the specified request
is served by either a GET or a HEAD method.
Declaration
public static bool IsGetOrHeadMethod(this HttpRequest request)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.AspNetCore.Http.HttpRequest | request | An instance of the Microsoft.AspNetCore.Http.HttpRequest object. |
Returns
Type | Description |
---|---|
System.Boolean |
|