Interface: SSEConfig

SSE configuration

Extends

Properties

data?

optional data?: unknown

Request body for POST SSE


headers?

optional headers?: Record<string, string>

Custom headers for SSE request


onClose?

optional onClose?: () => void

Called when the connection is closed

Returns

void

Inherited from

SSECallbacks.onClose


onError?

optional onError?: (error) => void

Called when an error occurs

Parameters

error

unknown

Returns

void

Inherited from

SSECallbacks.onError


onMessage?

optional onMessage?: (event) => void

Called when a message is received

Parameters

event

SSEMessageEvent

Returns

void

Inherited from

SSECallbacks.onMessage


onOpen?

optional onOpen?: () => void

Called when the connection is opened

Returns

void

Inherited from

SSECallbacks.onOpen


sse

sse: true

Enable SSE mode