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

Method text

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

Source from the content-addressed store, hash-verified

444
445 private textEffect: Effect.Effect<string, Error.HttpServerError> | undefined
446 get text(): Effect.Effect<string, Error.HttpServerError> {
447 if (this.textEffect) {
448 return this.textEffect
449 }
450 this.textEffect = Effect.runSync(Effect.cached(
451 Effect.tryPromise({
452 try: () => this.source.text(),
453 catch: (cause) =>
454 new Error.HttpServerError({
455 reason: new Error.RequestParseError({
456 request: this,
457 cause
458 })
459 })
460 })
461 ))
462 return this.textEffect
463 }
464
465 get json(): Effect.Effect<Schema.Json, Error.HttpServerError> {
466 return Effect.flatMap(this.text, (_) =>

Callers 7

readBodyFunction · 0.45
fetchTextFunction · 0.45
20_layer-launch.tsFile · 0.45
package-scalar.mjsFile · 0.45

Calls

no outgoing calls

Tested by 2

readBodyFunction · 0.36
fetchTextFunction · 0.36