SSEConfig
Defined in: packages/core/src/data/streaming/sse-connection.ts:19
Configuration for SSE connections.
Remarks
Section titled “Remarks”Server-Sent Events (SSE) is a server push technology enabling a client to receive automatic updates from a server via an HTTP connection.
SSE is unidirectional (server to client only) and automatically handles reconnection when the connection is lost.
Extends
Section titled “Extends”Properties
Section titled “Properties”| Property | Type | Description | Inherited from | Defined in |
|---|---|---|---|---|
eventTypes? | string[] | Event types to listen for (default: [‘message’]) Remarks The EventSource API can listen for custom event types sent by the server. By default, it listens to the ‘message’ event type. Example eventTypes: ['update', 'delete', 'create'] | - | packages/core/src/data/streaming/sse-connection.ts:32 |
reconnect? | boolean | Enable automatic reconnection on disconnect (default: true) | ConnectionConfig.reconnect | packages/core/src/data/streaming/base-connection.ts:68 |
reconnectConfig? | Partial<RetryConfig> | Reconnection retry configuration | ConnectionConfig.reconnectConfig | packages/core/src/data/streaming/base-connection.ts:71 |
url | string | Connection URL | ConnectionConfig.url | packages/core/src/data/streaming/base-connection.ts:65 |
withCredentials? | boolean | Include credentials in CORS requests (default: false) Remarks When true, the EventSource will include credentials (cookies, authorization headers, etc.) when making cross-origin requests. | - | packages/core/src/data/streaming/sse-connection.ts:41 |