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:
EduardF1
2026-07-01 06:08:49 +09:00
committed by GitHub
co-authored by Copilot
parent 03a9416a13
commit ed8795e5cc
+1 -1
View File
@@ -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`