Last Updated: 3/9/2026
API Reference - Additional Topics
Note: This section is under construction. Full API reference documentation will be added soon.
This page serves as a placeholder for additional API reference documentation that will be added to complete the reference section.
Reference Documentation To Be Added
The following API reference guides are planned:
Core APIs
- Context API - Complete reference for the Context object (
c) - Request API - HonoRequest object methods and properties
- Routing API - Advanced routing patterns and methods
- Presets - Router presets (
hono,hono/quick,hono/tiny)
Helper APIs
- Cookie Helpers - Cookie parsing and setting
- SSG Helpers - Static site generation utilities
- Streaming Helpers - Server-sent events and streaming responses
- HTML Helpers - HTML templating without JSX
- Factory Helpers - Creating handlers and middleware
- Testing Helpers - Type-safe testing utilities
Current Reference Documentation
The following reference docs are already available:
- Hono App API - Core Hono class methods
- Exception Handling - HTTPException usage
Comprehensive Coverage in Other Sections
Many API details are covered in depth in these sections:
Key Concepts
- Routing - Path parameters, wildcards, regex
- Context and Handlers - Context methods, request/response handling
- Middleware - Middleware patterns and lifecycle
- Routers - Router types and performance
Guides
- Validation - Request validation with Zod and others
- JSX Templating - JSX/TSX for HTML rendering
- RPC Client - Type-safe client generation
- Testing Applications - Testing patterns
Quick API Overview
While we complete the full reference documentation, here’s a quick overview:
Context Object (c)
// Request
c.req.param('id') // Path parameters
c.req.query('page') // Query parameters
c.req.header('Authorization') // Headers
c.req.json() // Parse JSON body
c.req.formData() // Parse form data
// Response
c.text('Hello') // Text response
c.json({ data }) // JSON response
c.html(<div>Hello</div>) // HTML response
c.redirect('/path') // Redirect
c.status(201) // Set status
c.header('X-Custom', 'value') // Set header
// Variables
c.set('user', user) // Set variable
c.get('user') // Get variable
// Environment
c.env.DATABASE_URL // Access bindings
c.env.MY_KV // KV namespaceHono App
// Routing
app.get('/path', handler)
app.post('/path', handler)
app.put('/path', handler)
app.delete('/path', handler)
app.all('/path', handler)
app.on('METHOD', '/path', handler)
// Middleware
app.use('*', middleware)
app.use('/api/*', middleware)
// Composition
app.route('/api', apiApp)
app.basePath('/v1')
app.mount('/other', otherFramework)
// Error Handling
app.notFound(handler)
app.onError(errorHandler)
// Testing
app.request('/path')
app.request(req)Community Resources
- Hono API Documentation - Official docs
- TypeScript Definitions - Source type definitions
- Hono Examples - Code examples
What’s Next
- Hono App API - Core application methods
- Exception Handling - Error handling
- Key Concepts - Detailed concept guides