Skip to main content
The Deno 2 Release Candidate is here
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
method ServerSentEventStreamTarget.prototype.asResponseInit
import { ServerSentEventStreamTarget } from "https://deno.land/std@0.193.0/http/mod.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]