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

Function createTodo

packages/platform/node/test/NodeHttpClient.test.ts:35–40  ·  view source on GitHub ↗
(todo: typeof TodoWithoutId.Type)

Source from the content-addressed store, hash-verified

33const makeLocalServerClient = Effect.gen(function*() {
34 const client = yield* HttpClient.HttpClient
35 const createTodo = (todo: typeof TodoWithoutId.Type) =>
36 HttpClientRequest.post("/todos").pipe(
37 HttpClientRequest.schemaBodyJson(TodoWithoutId)(todo),
38 Effect.flatMap(client.execute),
39 Effect.flatMap(HttpClientResponse.schemaBodyJson(Todo))
40 )
41 return {
42 client,
43 createTodo

Callers

nothing calls this directly

Calls 1

pipeMethod · 0.65

Tested by

no test coverage detected