RPC
in the docs of the RPC there isn't mentioned anything about redirect.
does this mean that using
c.redirect('/my-path')
work normally without any extra setup to the hono-client?1 Reply
the hono-client simply uses
fetch
under the hood, so if fetch
follows redirects, then yes
and by default, fetch
follows redirects
https://github.com/honojs/hono/blob/main/src/client/client.ts#L112-L117
hono-client doesn't override any option for the redirect
, so it's just vanilla fetch
--
PS: if you want to prevent redirects, simply pass { redirect: "error" }
as the init options