Function
json
(req: Parameters<typeof HttpClientResponse.fromWeb>[0], body: unknown, status = 200)
Source from the content-addressed store, hash-verified
| 23 | const it = testEffect(env) |
| 24 | |
| 25 | const json = (req: Parameters<typeof HttpClientResponse.fromWeb>[0], body: unknown, status = 200) => |
| 26 | HttpClientResponse.fromWeb( |
| 27 | req, |
| 28 | new Response(JSON.stringify(body), { |
| 29 | status, |
| 30 | headers: { "content-type": "application/json" }, |
| 31 | }), |
| 32 | ) |
| 33 | |
| 34 | const none = HttpClient.make(() => Effect.die("unexpected http call")) |
| 35 | |
Tested by
no test coverage detected