Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
interface ServerSentEventMessage
import { type ServerSentEventMessage } from "https://deno.land/std@0.220.0/http/server_sent_event_stream.ts";

Represents a message in the Server-Sent Event (SSE) protocol.

Properties

optional
comment: string

Ignored by the client.

optional
event: string

A string identifying the type of event described.

optional
data: string

The data field for the message. Split by new lines.

optional
id: string | number

The event ID to set the EventSource object's last event ID value.

optional
retry: number

The reconnection time.