Module

x/oak/deps.ts>ServerSentEventStreamTarget#asResponseInit

A middleware framework for handling HTTP with Deno 🐿️ 🦕
Extremely Popular
Go to Latest
method ServerSentEventStreamTarget.prototype.asResponseInit
import { ServerSentEventStreamTarget } from "https://dotland.deno.dev/x/oak@v12.3.1/deps.ts";

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

Parameters

optional
responseInit: ResponseInit = [UNSUPPORTED]

Returns

[BodyInit, ResponseInit]