You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What runtime/platform is your app running on? (with version if possible)
local - nodejs. remote - cloudflare workers
What steps can reproduce the bug?
Create an endpoint and use zValidator("json", someValidator)
create an RPC that client can use. use hc
access the endpoint and pass in a json body
check the network tab and you would see the content-type is text/plain instead of application/json
What is the expected behavior?
headers should be Content-Type = application/json
What do you see instead?
text/plain
Additional information
client rpc
endpoint:
error returned by zValidator cause he's not able to parse the body correctly.
correct payload was sent
incorrect headers were set
The text was updated successfully, but these errors were encountered:
I think the main problem here is in the implementation of hc. I am not sure, I can't seem to figure it out I've been having this trouble for a few months now. The JSON used to work but I don't remember which update broke it.
What version of Hono are you using?
4.6.16
What runtime/platform is your app running on? (with version if possible)
local - nodejs. remote - cloudflare workers
What steps can reproduce the bug?
Create an endpoint and use zValidator("json", someValidator)
create an RPC that client can use. use hc
access the endpoint and pass in a json body
check the network tab and you would see the content-type is text/plain instead of application/json
What is the expected behavior?
headers should be Content-Type = application/json
What do you see instead?
text/plain
Additional information
client rpc
endpoint:
error returned by zValidator cause he's not able to parse the body correctly.
correct payload was sent
incorrect headers were set
The text was updated successfully, but these errors were encountered: