x/oak/server_sent_event.ts

A middleware framework for handling HTTP with Deno 🐿️ 🦕
Very Popular
Go to Latest
interface ServerSentEventTargetOptions
import { type ServerSentEventTargetOptions } from "https://dotland-vbqsvsrpfncg.deno-staging.dev/x/oak@v11.1.0/server_sent_event.ts?s=ServerSentEventTargetOptions";

Properties

optional
headers: Headers
[src]

Additional headers to send to the client during startup. These headers will overwrite any of the default headers if the key is duplicated.

optional
keepAlive: boolean | number
[src]

Keep client connections alive by sending a comment event to the client at a specified interval. If true, then it polls every 30000 milliseconds (30 seconds). If set to a number, then it polls that number of milliseconds. The feature is disabled if set to false. It defaults to false.