Skip to content
Myr

docs(MIGRATION): fix req.raw.headers reference (property, not method) (#5047)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

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.

authored by EduardF1 · committed by GitHub · parent 03a9416 · Browse files · 1 file+1 added−1 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Trailers

  • Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Diff stats

1 file+1 added−1 removed

  • other:+1 added−1 removed

1 file+1 added−1 removed

modified:docs/MIGRATION.md+1 added-1 removed
32 unmodified lines
33- Hono - `app.routerName` is obsolete. Use `getRouterName()` in `hono/dev` instead.34- Hono - `app.head()` is no longer used. `app.get()` implicitly handles the HEAD method.35- Hono - `app.handleEvent()` is obsolete. Use `app.fetch()` instead.36- HonoRequest - `req.cookie()` is obsolete. Use `getCookie()` in `hono/cookie` instead.37- HonoRequest - `headers()`, `body()`, `bodyUsed()`, `integrity()`, `keepalive()`, `referrer()`, and `signal()` are obsolete. Use the methods in `req.raw` such as `req.raw.headers()`.37- HonoRequest - `headers()`, `body()`, `bodyUsed()`, `integrity()`, `keepalive()`, `referrer()`, and `signal()` are obsolete. Use the equivalent properties on `req.raw` such as `req.raw.headers`.3839### `serveStatic` in Cloudflare Workers Adapter requires `manifest`4041If you use the Cloudflare Workers adapter's `serve-static`, you should specify the `manifest` option.
254 unmodified lines