MCPcopy Create free account
hub / github.com/Effect-TS/effect / stream

Method stream

packages/platform/deno/src/DenoHttpServer.ts:364–381  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

362 }
363
364 get stream(): Stream.Stream<Uint8Array, Error.HttpServerError> {
365 return this.source.body
366 ? Stream.fromReadableStream({
367 evaluate: () => this.source.body ?? emptyReadableStream,
368 onError: (cause) =>
369 new Error.HttpServerError({
370 reason: new Error.RequestParseError({ request: this, cause })
371 })
372 })
373 : Stream.fail(
374 new Error.HttpServerError({
375 reason: new Error.RequestParseError({
376 request: this,
377 description: "can not create stream from empty body"
378 })
379 })
380 )
381 }
382
383 private textEffect: Effect.Effect<string, Error.HttpServerError> | undefined
384 get text(): Effect.Effect<string, Error.HttpServerError> {

Callers

nothing calls this directly

Calls 1

failMethod · 0.45

Tested by

no test coverage detected