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

x/oak_http_proxy/test/deps.ts>Oak.ServerSentEventInit

Proxy middleware for Deno Oak HTTP servers. 🐿 🦕
Latest
interface Oak.ServerSentEventInit
implements EventInit
import { type Oak } from "https://deno.land/x/oak_http_proxy@2.3.0/test/deps.ts";
const { ServerSentEventInit } = Oak;

Properties

optional
data: unknown

Optional arbitrary data to send to the client, data this is a string will be sent unmodified, otherwise JSON.parse() will be used to serialize the value.

optional
id: number

An optional id which will be sent with the event and exposed in the client EventSource.

optional
replacer: (string | number)[] | ((
this: any,
key: string,
value: any,
) => any)

The replacer is passed to JSON.stringify when converting the data property to a JSON string.

optional
space: string | number

Space is passed to JSON.stringify when converting the data property to a JSON string.