v4.9.0
honojs/honov4.9.0Aug 7, 2025by yusukebe
AI Summary
Hono v4.9.0 introduces the new `parseResponse` utility for RPC clients, along with various enhancements including JWT issuer validation, cookie generation helpers, JWK custom header support, and AWS Lambda binary content-type handling.
Key Highlights
- New `parseResponse` utility makes it easier to work with RPC client responses with automatic parsing and structured error handling
- JWT now supports validation for the issuer (iss) claim
- Added `generateCookie` and `generateSignedCookie` helper functions
- JWK middleware now supports custom headerName configuration
- AWS Lambda now specifies content-type as binary for better compatibility
New Features
- New `parseResponse` utility for parsing RPC client responses with automatic Content-Type handling
- Bun: allow importing upgradeWebSocket and websocket directly
- AWS Lambda: specify content-type as binary
- JWT: add validation for the issuer (iss) claim
- JWK: add headerName to JWK middleware
- Cookie: add generateCookie and generateSignedCookie helpers
- serve-static: use join to correct path resolution
- JWT: expose utility function verifyWithJwks for external use
- SSG: mark old hook options as deprecated
Full Release Notes
# Release Notes
Hono v4.9.0 is now available!
This release introduces several enhancements and utilities.
The main highlight is the new `parseResponse` utility that makes it easier to work with RPC client responses.
## parseResponse Utility
The new `parseResponse` utility provides a convenient way to parse responses from Hono RPC clients (`hc`). It automatically handles different response formats and throws structured errors for failed requests.
```ts
import { parseResponse, DetailedError } from 'hono/client'
// result contains the parsed response body (automatically parsed based on Content-Type)
const result = await parseResponse(client.hello.$get()).catch(
// parseResponse automatically throws an error if response is not ok
(e: DetailedError) => {
console.error(e)
}
)
```
This makes working with RPC client responses much more straightforward and type-safe.
Thanks @NamesMT!
## New features
- feat(bun): allow importing upgradeWebSocket and websocket directly https://github.com/honojs/hono/pull/4242
- feat(aws-lambda): specify content-type as binary https://github.com/honojs/hono/pull/4250
- feat(jwt): add validation for the issuer (iss) claim https://github.com/honojs/hono/pull/4253
- feat(jwk): add headerName to JWK middleware https://github.com/honojs/hono/pull/4279
- feat(cookie): add generateCookie and generateSignedCookie helpers https://github.com/honojs/hono/pull/4285
- feat(serve-static): use join to correct path resolution https://github.com/honojs/hono/pull/4291
- feat(jwt): expose utility function verifyWithJwks for external use https://github.com/honojs/hono/pull/4302
- feat: add parseResponse util to smartly parse hc's Response https://github.com/honojs/hono/pull/4314
- feat(ssg): mark old hook options as deprecated https://github.com/honojs/hono/pull/4331
## All changes
- feat(aws-lambda): specify content-type as binary by @Kanahiro in https://github.com/honojs/hono/pull/4250
- feat(jwt): added validation for the issuer (`iss`) claim by @yolocat-dev in https://github.com/honojs/hono/pull/4253
- feat(jwk): Add custom `headerName` to JWK middleware by @JoaquinGimenez1 in https://github.com/honojs/hono/pull/4279
- feat(cookie): generateCookie and generateSignedCookie helpers by @Soviut in https://github.com/honojs/hono/pull/4285
- feat(serve-static): use `join` to correct path resolution by @yusukebe in https://github.com/honojs/hono/pull/4291
- feat(jwt): Exposing utility function `verifyWithJwks` for external use by @Beyondo in https://github.com/honojs/hono/pull/4302
- feat: add `parseResponse` util to smartly parse `hc`'s Response by @NamesMT in https://github.com/honojs/hono/pull/4314
- feat(ssg): mark old hook options as deprecated by @3w36zj6 in https://github.com/honojs/hono/pull/4331
- fix(bun): exports functions related to websocket by @yusukebe in https://github.com/honojs/hono/pull/4341
- Next by @yusukebe in https://github.com/honojs/hono/pull/4340
- chore: enable `skipLibCheck` to resolve TypeScript compilation issues by @yusukebe in https://github.com/honojs/hono/pull/4342
## New Contributors
- @yolocat-dev made their first contribution in https://github.com/honojs/hono/pull/4253
- @JoaquinGimenez1 made their first contribution in https://github.com/honojs/hono/pull/4279
- @Soviut made their first contribution in https://github.com/honojs/hono/pull/4285
**Full Changelog**: https://github.com/honojs/hono/compare/v4.8.12...v4.9.0