Class ServerSentEventsOptions
Options for Server-Sent Events endpoint.
Inherited Members
Namespace: Lib.AspNetCore.ServerSentEvents
Assembly: Lib.AspNetCore.ServerSentEvents.dll
Syntax
public class ServerSentEventsOptions
Constructors
ServerSentEventsOptions()
Initializes new instance of ServerSentEventsOptions.
Declaration
public ServerSentEventsOptions()
Properties
Authorization
Gets or sets the authorization rules.
Declaration
public ServerSentEventsAuthorization Authorization { get; set; }
Property Value
| Type | Description |
|---|---|
| ServerSentEventsAuthorization |
OnPrepareAccept
Called after the status code and Content-Type have been set, but before the headers has been written. This can be used to add or change the response headers.
Declaration
public Action<HttpResponse> OnPrepareAccept { get; set; }
Property Value
| Type | Description |
|---|---|
| Action<HttpResponse> |
RequireAcceptHeader
Gets or sets the value indicating if Accept HTTP header with value of text/event-stream should be required.
Declaration
public bool RequireAcceptHeader { get; set; }
Property Value
| Type | Description |
|---|---|
| bool |