mirror of
https://github.com/honojs/hono
synced 2026-08-09 12:38:41 +00:00
docs(MIGRATION): fix req.raw.headers reference (property, not method) (#5047)
req.raw is a Fetch API Request, whose headers/body/bodyUsed/integrity/ keepalive/referrer/signal are properties, not methods. The v4 migration guide showed eq.raw.headers(), which throws TypeError: ... is not a function. Use the property eq.raw.headers and refer to them as properties rather than methods. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
+1
-1
@@ -34,7 +34,7 @@ There are some breaking changes.
|
||||
- Hono - `app.head()` is no longer used. `app.get()` implicitly handles the HEAD method.
|
||||
- Hono - `app.handleEvent()` is obsolete. Use `app.fetch()` instead.
|
||||
- HonoRequest - `req.cookie()` is obsolete. Use `getCookie()` in `hono/cookie` instead.
|
||||
- HonoRequest - `headers()`, `body()`, `bodyUsed()`, `integrity()`, `keepalive()`, `referrer()`, and `signal()` are obsolete. Use the methods in `req.raw` such as `req.raw.headers()`.
|
||||
- HonoRequest - `headers()`, `body()`, `bodyUsed()`, `integrity()`, `keepalive()`, `referrer()`, and `signal()` are obsolete. Use the equivalent properties on `req.raw` such as `req.raw.headers`.
|
||||
|
||||
### `serveStatic` in Cloudflare Workers Adapter requires `manifest`
|
||||
|
||||
|
||||
Reference in New Issue
Block a user