Replies: 1 comment 2 replies
-
Hono will throw an error as well if there was no json sent, and you can customize the error on You will still need to check is an empty json object was sent. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I am new to HonoJs, and trying to figure out how to check if a post request has json payload attached. Hope someone can help me out. Thanks in advance. So here is my code:
So, If I call my api via a POST request without a payload, then I am getting this error " SyntaxError: Unexpected end of JSON input"
I've tried the following solution, but none of them works:
So how did u guy check the payload exists in Hono?
Beta Was this translation helpful? Give feedback.
All reactions