Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/ayonli_jsext/sse.ts>EventEndpoint#send

A JavaScript extension package for building strong and modern applications.
Latest
method EventEndpoint.prototype.send
import { EventEndpoint } from "https://deno.land/x/ayonli_jsext@v0.9.72/sse.ts";

Sends a message to the client.

The client (EventSource or EventConsumer) will receive the message as a MessageEvent, which can be listened to using the message event.

Parameters

data: string

If specified, the client will remember the value as the last event ID and will send it back to the server when reconnecting.

optional
eventId: string | undefined = [UNSUPPORTED]

Returns

Promise<void>