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

Method text

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

Source from the content-addressed store, hash-verified

382
383 private textEffect: Effect.Effect<string, Error.HttpServerError> | undefined
384 get text(): Effect.Effect<string, Error.HttpServerError> {
385 return this.textEffect ??= Effect.runSync(Effect.cached(
386 Effect.tryPromise({
387 try: () => this.source.text(),
388 catch: (cause) =>
389 new Error.HttpServerError({
390 reason: new Error.RequestParseError({ request: this, cause })
391 })
392 })
393 ))
394 }
395 get json(): Effect.Effect<Schema.Json, Error.HttpServerError> {
396 return Effect.flatMap(this.text, (_) =>
397 Effect.try({

Callers 4

readStreamFunction · 0.45
readBodyFunction · 0.45

Calls

no outgoing calls

Tested by 2

readStreamFunction · 0.36
readBodyFunction · 0.36