/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-path-45948703af8c-path-s0060-c0000.md

`$path()` - hono-docs

$path() Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt path Summary $path() is similar to $url()...

$path()

Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#path

Summary

$path() is similar to $url(), but returns a path string instead of a URL object. Unlike $url(), it does not include the base URL origin, so it works regardless of the base URL you pass to hc. ```ts const route = app .get('/api/...

Content

$path() is similar to $url(), but returns a path string instead of a URL object. Unlike $url(), it does not include the base URL origin, so it works regardless of the base URL you pass to hc.

const route = app
  .get('/api/posts', (c) => c.json({ posts }))
  .get('/api/posts/:id', (c) => c.json({ post }))

const client = hc<typeof route>('http://localhost:8787/')

let path = client.api.posts.$path()
console.log(path) // `/api/posts`

path = client.api.posts[':id'].$path({
  param: {
    id: '123',
  },
})
console.log(path) // `/api/posts/123`

You can also pass query parameters:

const path = client.api.posts.$path({
  query: {
    page: '1',
    limit: '10',
  },
})
console.log(path) // `/api/posts?page=1&limit=10`
Kinic Wiki
Loading knowledge node
Details

Identity

database
db_23dhmsxlhukv
database_id
db_23dhmsxlhukv
path
/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-path-45948703af8c-path-s0060-c0000.md
kind
directory
role
markdown_note
children
0

Metadata

created_at
virtual
updated_at
virtual
etag
virtual
metadata_json
{}

Lint Hints

No lightweight warnings.

Outgoing Links

No outgoing links indexed.

Incoming Links

Select a file node to inspect backlinks.

Raw Source

No raw source path inferred.