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

Function makeClient

packages/effect/test/httpapi/HttpApiClient.test.ts:787–793  ·  view source on GitHub ↗
(body: () => ReadableStream<Uint8Array>)

Source from the content-addressed store, hash-verified

785 )
786 )
787 const makeClient = (body: () => ReadableStream<Uint8Array>) =>
788 HttpApiClient.makeWith(NdjsonApi, {
789 baseUrl: "http://test",
790 httpClient: clientFromResponse(() =>
791 new Response(body(), { status: 200, headers: { "content-type": "application/x-ndjson" } })
792 )
793 })
794 const collectUntilFailure = Effect.fnUntraced(function*<A, E>(stream: Stream.Stream<A, E>) {
795 const delivered: Array<A> = []
796 const error = yield* stream.pipe(

Callers 1

Calls 2

clientFromResponseFunction · 0.85
bodyFunction · 0.50

Tested by

no test coverage detected