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

Function makeHttpClient

packages/effect/test/rpc/RpcClient.test.ts:19–27  ·  view source on GitHub ↗
(body: string)

Source from the content-addressed store, hash-verified

17)
18
19const makeHttpClient = (body: string): HttpClient.HttpClient =>
20 HttpClient.make((request) =>
21 Effect.succeed(
22 HttpClientResponse.fromWeb(
23 request,
24 new Response(body, { status: 200 })
25 )
26 )
27 )
28
29const makeProtocolLayerWithClient = (
30 serializationLayer: Layer.Layer<RpcSerialization.RpcSerialization>,

Callers 2

makeProtocolLayerFunction · 0.70

Calls 2

makeMethod · 0.65
succeedMethod · 0.45

Tested by

no test coverage detected