/Knowledge/sources/honojs__hono/llms-full/accepts-helper-accepts--4ab997bfcd7a.md
Accepts Helper: accepts() - hono-docs
Accepts Helper: accepts() Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt accepts Summary The accepts(...
Accepts Helper: accepts()
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#accepts
Summary
The accepts() function looks at the Accept header, such as Accept-Encoding and Accept-Language, and returns the proper value. ```ts import { accepts } from 'hono/accepts' app.get('/', (c) => { const accept = accepts(c, { header: 'Accep...
Content
The accepts() function looks at the Accept header, such as Accept-Encoding and Accept-Language, and returns the proper value.
import { accepts } from 'hono/accepts'
app.get('/', (c) => {
const accept = accepts(c, {
header: 'Accept-Language',
supports: ['en', 'ja', 'zh'],
default: 'en',
})
return c.json({ lang: accept })
})
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#accepts",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / Accepts Helper > `accepts()`",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 665,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "Accepts Helper: accepts()",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}