How to use hono/client
with a different fetch client
#3699
Labels
enhancement
New feature or request.
hono/client
with a different fetch client
#3699
What is the feature you are proposing?
I am trying to use
hc
withunjs/ofetch
. Ofetch makes it quite easy to implement a jwt refresh flow, retries, interceptor, etc.. Technically, it does work fine like so:The only issue is that the return of ofetch does not match hc's
ClientResponse
. This is due to the fact that ofetch unwraps the data by default. Soawait res.json()
is not neccessary.I do not see any way to update the hono's typing. I understand that hono is about working with web standards, but it would be super useful to work with a different client. Basically, what I would like to do is something like this:
This was already mentioned in #2542.
Are there any plans to make this possible or do you see a solution right away?
Thank you for the amazing project!
The text was updated successfully, but these errors were encountered: