Defjs
Core

withSSEHandle

Replaces the Fetch-compatible function used to open SSE event streams.

@defjs/core · Function

Signature

function withSSEHandle(fetchImpl: FetchHandle): ClientOption;

The default is the platform fetch. fetchImpl is a FetchHandle. It only affects SSE. HTTP uses withHTTPHandle.

Parameters

Prop

Type

fetchImpl FetchHandle

(input, init?) => Promise<Response>. Not typeof fetch, so a mock does not need host extras such as preconnect.

Returns

An option that sets config.sse.handle.

Edit this page on GitHub
Released under the MIT License. · Copyright © 2026 MunMunMiao