/Knowledge/sources/honojs__hono/llms-full/honorequest-routepath--5379cd6b2344.md
HonoRequest: routePath - hono-docs
HonoRequest: routePath Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt routepath Summary ::: warning D...
HonoRequest: routePath
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#routepath
Summary
::: warning Deprecated in v4.8.0: This property is deprecated. Use routePath() from Route Helper instead. ::: You can retrieve the registered path within the handler like this: ```ts twoslash import { Hono }...
Content
::: warning
Deprecated in v4.8.0: This property is deprecated. Use routePath() from Route Helper instead.
:::
You can retrieve the registered path within the handler like this:
import { Hono } from 'hono'
const app = new Hono()
// ---cut---
app.get('/posts/:id', (c) => {
return c.json({ path: c.req.routePath })
})
If you access /posts/123, it will return /posts/:id:
{ "path": "/posts/:id" }
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#routepath",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / HonoRequest > routePath",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 584,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "HonoRequest: routePath",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}