HonoH
Hono10mo ago
JustKira

How to change to FETCH client of Hono to Ky.js or Axios

i like ky.js i wanted to make rpc use ky.js other than normal fetch method im using it with sveltekit

export const honoHandle: Handle = async ({ event, resolve }) => {
    const client = hc<AppType>('/', { fetch: event.fetch });
    event.locals.api = client.api.hono;

    return resolve(event);
};


why I am asking this because i start to get annoyed for await request.json() pattern and error handling

there some other cool packages like Effect that makes fetching way ezy and handling its error without try catch so how do i do that?
Was this page helpful?