We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent dcdd8c1 commit 2d3fe06Copy full SHA for 2d3fe06
1 file changed
packages/api/tests/skiller-cors.test.ts
@@ -12,7 +12,12 @@ const apiHandler = HttpApp.toWebHandler(
12
Effect.provide(Effect.flatten(HttpRouter.toHttpApp(makeRouter())), NodeContext.layer)
13
)
14
15
-const requestApiRoute = (path: string, init: RequestInit) =>
+type ApiRequestInit = {
16
+ readonly headers: Record<string, string>
17
+ readonly method: string
18
+}
19
+
20
+const requestApiRoute = (path: string, init: ApiRequestInit) =>
21
Effect.tryPromise({
22
try: () => apiHandler(new Request(`http://127.0.0.1${path}`, init)),
23
catch: (cause) => new Error(String(cause))
0 commit comments