kinetex - v1.0.0-rc.1
    Preparing search index...

    Function createSSEResponse

    • Create an SSE server response with a generator function. The generator yields events; when it returns, the stream closes.

      Parameters

      • this: void
      • generator: (sse: SSEServerResponse) => void | Promise<void>

        Function that receives an SSEServerResponse to send events.

      • headers: Record<string, string> = {}

        Additional HTTP headers for the Response.

      Returns Response

      An HTTP Response with content-type text/event-stream.