Issue with Setting Up Fetch Request in Effect

Hi, I'm just starting to learn Effect and I'm having some issues getting started with just a simple setup. I don't see anywhere in the docs how to set up a simple fetch get request to an api, i'm sure it's something easy that I'm missing!

For the fetchOk() i'm getting the error:

Argument of type 'Effect<ClientResponse, HttpClientError, Scope>' is not assignable to parameter of type '(_: ClientRequest) => unknown'. Type 'Effect<ClientResponse, HttpClientError, Scope>' provides no match for the signature '(_: ClientRequest): unknown'.ts(2345)

import * as Http from '@effect/platform/HttpClient';
import { Effect } from 'effect';

export const getTodos = () =>
  Http.request
    .get('https://jsonplaceholder.typicode.com/todos')
    .pipe(Http.client.fetchOk(), Http.response.json, Effect.retry({ times: 3 }));


Any suggestions? And then, how would i proceed to validate the response ot a schema, in a way that you would normally do with zod?
Was this page helpful?