The Route Helper provides utilities for accessing information about matched routes and base paths.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/honojs/hono/llms.txt
Use this file to discover all available pages before exploring further.
Import
Functions
matchedRoutes()
Get all matched routes for the current request.The context object
Optional index to get a specific route (supports negative indices)
The matched route(s) or undefined if index is out of range
routePath()
Get the matched route path.The context object
The route path (e.g., ‘/api/:id’)
baseRoutePath()
Get the base route path from the routes array.The context object
The base route path
basePath()
Get the base path from the request.The context object
The base path (e.g., ‘/api’)