/Knowledge/sources/honojs__hono/llms-full/context-header--89b9668c3456.md
Context: header() - hono-docs
Context: header() Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt header Summary You can set HTTP Head...
Context: header()
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#header
Summary
You can set HTTP Headers for the response. ts twoslash import { Hono } from 'hono' const app = new Hono() // ---cut--- app.get('/', (c) => { // Set headers c.header('X-Message', 'My custom message') return c.text('Hello!') })
Content
You can set HTTP Headers for the response.
import { Hono } from 'hono'
const app = new Hono()
// ---cut---
app.get('/', (c) => {
// Set headers
c.header('X-Message', 'My custom message')
return c.text('Hello!')
})
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#header",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / Context > header()",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 553,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "Context: header()",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}