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

Method stream

packages/platform/bun/src/BunHttpServer.ts:423–443  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

421 }
422
423 get stream(): Stream.Stream<Uint8Array, Error.HttpServerError> {
424 return this.source.body
425 ? BunStream.fromReadableStream({
426 evaluate: () => this.source.body ?? emptyReadbleStream,
427 onError: (cause) =>
428 new Error.HttpServerError({
429 reason: new Error.RequestParseError({
430 request: this,
431 cause
432 })
433 })
434 })
435 : Stream.fail(
436 new Error.HttpServerError({
437 reason: new Error.RequestParseError({
438 request: this,
439 description: "can not create stream from empty body"
440 })
441 })
442 )
443 }
444
445 private textEffect: Effect.Effect<string, Error.HttpServerError> | undefined
446 get text(): Effect.Effect<string, Error.HttpServerError> {

Callers

nothing calls this directly

Calls 1

failMethod · 0.45

Tested by

no test coverage detected