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

x/oak/deps.ts>ServerSentEventStreamTarget#asResponseInit

A middleware framework for handling HTTP with Deno, Node, Bun and Cloudflare Workers 🐿️ 🦕
Very Popular
Go to Latest
method ServerSentEventStreamTarget.prototype.asResponseInit
import { ServerSentEventStreamTarget } from "https://deno.land/x/oak@v14.1.1/deps.ts";

Returns a tuple which contains the BodyInit and ResponseInit needed to create a response that will establish a SSE connection with the client.

Parameters

optional
responseInit: ResponseInit = [UNSUPPORTED]