Skip to content
Source
Sign inSign up
pingdotgg/t3code
Open History to see the last commit

requestInit.ts

7 lines373 Bytes

1import * as Effect from "effect/Effect";
2import { FetchHttpClient } from "effect/unstable/http";
3​
4export const primaryEnvironmentRequestInit = { credentials: "include" } as const;
5​
6export const withPrimaryEnvironmentRequestInit = <A, E, R>(effect: Effect.Effect<A, E, R>) =>
7 effect.pipe(Effect.provideService(FetchHttpClient.RequestInit, primaryEnvironmentRequestInit));