/Knowledge/sources/honojs__hono/llms-full/getting-started-request-and-response--e817c24de7c0.md
Getting Started: Request and Response - hono-docs
Getting Started: Request and Response Source evidence: /Sources/honojs hono/provenance.md Canonical citation: https://hono.dev/llms full.txt request and resp...
Getting Started: Request and Response
Source evidence: /Sources/honojs__hono/provenance.md Canonical citation: https://hono.dev/llms-full.txt#request-and-response
Summary
Getting a path parameter, URL query value, and appending a Response header is written as follows. ```ts app.get('/posts/:id', (c) => { const page = c.req.query('page') const id = c.req.param('id') c.header('X-Message', 'Hi!') return c.te...
Content
Getting a path parameter, URL query value, and appending a Response header is written as follows.
app.get('/posts/:id', (c) => {
const page = c.req.query('page')
const id = c.req.param('id')
c.header('X-Message', 'Hi!')
return c.text(`You want to see ${page} of ${id}`)
})
We can easily handle POST, PUT, and DELETE not only GET.
app.post('/posts', (c) => c.text('Created!', 201))
app.delete('/posts/:id', (c) =>
c.text(`${c.req.param('id')} is deleted!`)
)
Metadata
{
"chunk_index": 0,
"citation": "https://hono.dev/llms-full.txt#request-and-response",
"coverage_role": "overview",
"qualified_title": "Hono / llms-full / Getting Started > Request and Response",
"retrieved_at": "2026-07-02T05:51:01Z",
"section_index": 519,
"source_id": "/honojs/hono",
"source_type": "llms_full",
"target_label": "llms-full",
"title": "Getting Started: Request and Response",
"upstream_url": "https://hono.dev/llms-full.txt",
"version": "2026"
}