talkwho/src/lib/apiclient.ts
2024-08-16 23:42:18 -04:00

10 lines
No EOL
302 B
TypeScript

import { type api } from "./hono"
import { hc } from "hono/client"
export const client = hc<api>('/api', {
async fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response> {
return await fetch(input, {
...init,
credentials: 'include',
})
}
})