Class HttpResponseExtensions
- Namespace
- Duende.IdentityServer.Extensions
- Assembly
- Duende.IdentityServer.dll
public static class HttpResponseExtensions
- Inheritance
-
HttpResponseExtensions
- Inherited Members
-
Methods
public static void AddCspHeaders(IHeaderDictionary headers, CspOptions options, string cspHeader)
Parameters
headers
IHeaderDictionary
options
CspOptions
cspHeader
string
public static void AddScriptCspHeaders(this HttpResponse response, CspOptions options, string hash)
Parameters
response
HttpResponse
options
CspOptions
hash
string
public static void AddStyleCspHeaders(this HttpResponse response, CspOptions options, string hash, string frameSources)
Parameters
response
HttpResponse
options
CspOptions
hash
string
frameSources
string
SetCache(HttpResponse, int, params string[])
public static void SetCache(this HttpResponse response, int maxAge, params string[] varyBy)
Parameters
response
HttpResponse
maxAge
int
varyBy
string[]
SetNoCache(HttpResponse)
public static void SetNoCache(this HttpResponse response)
Parameters
response
HttpResponse
WriteHtmlAsync(HttpResponse, string)
public static Task WriteHtmlAsync(this HttpResponse response, string html)
Parameters
response
HttpResponse
html
string
Returns
- Task
WriteJsonAsync(HttpResponse, object, string)
public static Task WriteJsonAsync(this HttpResponse response, object o, string contentType = null)
Parameters
response
HttpResponse
o
object
contentType
string
Returns
- Task
WriteJsonAsync(HttpResponse, string, string)
public static Task WriteJsonAsync(this HttpResponse response, string json, string contentType = null)
Parameters
response
HttpResponse
json
string
contentType
string
Returns
- Task