/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-set-request-id-11d449df7da5-set-request-id-s0340-c0000.md

Set Request ID - hono-docs

Set Request ID Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt set request id Summary You set a c...

Set Request ID

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

Summary

You set a custom request ID in the header (default: X-Request-Id), the middleware will use that value instead of generating a new one: ``ts const app = new Hono() app.use('*', requestId()) app.get('/', (c) => { return c.text(${c.get(...

Content

You set a custom request ID in the header (default: X-Request-Id), the middleware will use that value instead of generating a new one:

const app = new Hono()

app.use('*', requestId())

app.get('/', (c) => {
  return c.text(`${c.get('requestId')}`)
})

const res = await app.request('/', {
  headers: {
    'X-Request-Id': 'your-custom-id',
  },
})
console.log(await res.text()) // your-custom-id

If you want to disable this feature, set headerName option to an empty string.

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-set-request-id-11d449df7da5-set-request-id-s0340-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.