Yusuke Wada
Yusuke Wada
This matter should be considered. Exactly, the return value from `await next()` is `Context`, so it's better to type it. But, only by changing, another type error will occur if...
Hi @sher Thank you for sharing your opinion. > Is there support for such feature in hono? If not, is it something planned? Hono does not have a future now....
@sher My idea is to create another validator like `responseValidator` to validate response content. Below are a rough implementation. I think it's difficult to infer the response type in the...
Hi @armando19993 Have you ever seen this page? https://hono.dev/helpers/jwt
Hi @damianpumar The interesting thing about this problem is that the result of `new Response(undefined)` is different at different runtimes. although it might be expected to throw an error. So...
Hi @marcosrjjunior @damianpumar ! As @damianpumar says, validating the value passed to `c.json()` on the Hono side is one good way. However, I am concerned about the performance degradation and...
Ah! Maybe we can refer to the implementation by Deno: https://github.com/denoland/deno/blob/0d43a63636c97886c10c6b8ce05fdb67cd2d8b91/ext/web/00_infra.js#L382-L388 ```js function serializeJSValueToJSONString(value) { const result = JSONStringify(value); if (result === undefined) { throw new TypeError("Value is not JSON...
@marcosrjjunior But then, I think we don't need to use `Response.json()`.
If we follow Deno's implementation, the difference is whether or not it throws an error when the value is `undefined`. That would be nice. But I'm not sure if I...
Hi @szmarczak The router doesn't need to decode the path. Instead, if you want to decode it, you can use the `getPath` option for `new Hono()`. ```ts import { Hono...