Problem passing jwt token by rpc
hi guys, i have an endpoint localhost:5555/api/summary, that works fine testing on any app like postman, passing an Bearer token, but do not work when i use hono client passing the bearer token, always says that the token is not passed
4 Replies
i do not belive, 5h trywing to find the issue, and now i find in a github issue, is just put undefined before passing headers...
hey @devve2kcc! could you share a link to the github issue you found?
but yeah, though its not mentioned explicitly in the docs, the first arg of all the fetch functions is for request data (including params + queries)
GitHub
Not able to pass the bearer token as a headers not working · Issue ...
What version of Hono are you using? ^4.6.12 What runtime/platform is your app running on? (with version if possible) Node What steps can reproduce the bug? import { client } from '@/lib/hono...
ah, i see. i looked for this and didn't see it: https://hono.dev/docs/guides/rpc#headers
RPC - Hono
Web framework built on Web Standards for Cloudflare Workers, Fastly Compute, Deno, Bun, Vercel, Node.js, and others. Fast, but not only fast.