MCPcopy
hub / github.com/Effect-TS/effect / stream

Function stream

packages/platform/src/internal/httpServerResponse.ts:315–327  ·  view source on GitHub ↗
(
  body: Stream.Stream<Uint8Array, E>,
  options?: ServerResponse.Options | undefined
)

Source from the content-addressed store, hash-verified

313
314/** @internal */
315export const stream = <E>(
316 body: Stream.Stream<Uint8Array, E>,
317 options?: ServerResponse.Options | undefined
318): ServerResponse.HttpServerResponse => {
319 const headers = options?.headers ? Headers.fromInput(options.headers) : Headers.empty
320 return new ServerResponseImpl(
321 options?.status ?? 200,
322 options?.statusText,
323 headers,
324 options?.cookies ?? Cookies.empty,
325 internalBody.stream(body, getContentType(options, headers), options?.contentLength)
326 )
327}
328
329/** @internal */
330export const getContentType = (

Callers 1

htmlStreamFunction · 0.70

Calls 2

getContentTypeFunction · 0.85
streamMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…