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

Function readBody

packages/platform/deno/test/DenoHttpPlatform.test.ts:11–14  ·  view source on GitHub ↗
(body: HttpBody.HttpBody)

Source from the content-addressed store, hash-verified

9const readStream = (stream: ReadableStream<Uint8Array>) => Effect.promise(() => new globalThis.Response(stream).text())
10
11const readBody = (body: HttpBody.HttpBody) => {
12 assert.strictEqual(body._tag, "Raw")
13 return Effect.promise(() => new Response((body as HttpBody.Raw).body as BodyInit).text())
14}
15
16describe("DenoHttpPlatform", () => {
17 it.effect("fileWebResponse honors offset and bytesToRead including zero", () =>

Callers 1

Calls 1

textMethod · 0.45

Tested by

no test coverage detected