/Wiki/sources/honojs__hono/2026/https-hono-dev-llms-full-txt-status-4b803be6b5bd-status-s0552-c0000.md
status() - hono-docs
status() Source evidence: /Sources/raw/honojs hono/honojs hono.md Canonical citation: https://hono.dev/llms full.txt status Summary You can set an HTTP statu...
status()
Source evidence: /Sources/raw/honojshono/honojshono.md Canonical citation: https://hono.dev/llms-full.txt#status
Summary
You can set an HTTP status code with c.status(). The default is 200. You don't have to use c.status() if the code is 200. ```ts twoslash import { Hono } from 'hono' const app = new Hono() // ---cut--- app.post('/posts', (c) => {...
Content
You can set an HTTP status code with c.status(). The default is 200. You don't have to use c.status() if the code is 200.
import { Hono } from 'hono'
const app = new Hono()
// ---cut---
app.post('/posts', (c) => {
// Set HTTP status code
c.status(201)
return c.text('Your post is created!')
})