Summary
This is a patch release, but including some new features.
Custom fetch method for Hono Client
Previously, Hono Client could only use the built-in fetch
, but now users can specify it.
For example, you can pass the fetch
method of Cloudflare Service Bindings.
services = [
{ binding = "AUTH", service = "auth-service" },
]
const client = hc<CreateProfileType>('/', { fetch: c.env.AUTH.fetch });
Allow a pathname argument for app.request
We could only pass a full URL to app.request
as an argument, but now we can pass the pathname. This is very useful for testing.
const res = await app.request('/hello')
What's Changed
- Custom fetch method for Hono Client options by @JonasHiltl in #920
- feat: allow pathname argument by @hagishi in #921
- fix(types):
app.route
with multiple endpoints returns types correctly by @yusukebe in #919 - Expose HonoRequest Type by @KeKs0r in #918
- refactor(util): remove using
Buffer
fromencode.ts
by @yusukebe in #925 - fix(validator): clone Request object if
json
orform
by @yusukebe in #926 - feat(deno): export
HonoRequest
type in Deno by @yusukebe in #927
New Contributors
- @JonasHiltl made their first contribution in #920
- @KeKs0r made their first contribution in #918
Full Changelog: v3.0.1...v3.0.2