Interface for context renderer.
Interface for context variable mapping.
Interface for the execution context in a web worker or similar environment.
The Hono class extends the functionality of the HonoBase class. It sets up routing and allows for custom options to be passed.
Match the accept header with the given options.
Accepts events from API Gateway/ELB(APIGatewayProxyEvent
) and directly through Function Url(APIGatewayProxyEventV2
)
Basic Auth Middleware for Hono.
Bearer Auth Middleware for Hono.
Body Limit Middleware for Hono.
Get ConnInfo with Bun
Cache Middleware for Hono.
Compress Middleware for Hono.
Helper type
Context Storage Middleware for Hono.
CORS Middleware for Hono.
CSRF Protection Middleware for Hono.
Get conninfo with Deno
ETag Middleware for Hono.
Default headers to pass through on 304 responses. From the spec:
HTTPException
must be used when a fatal error such as authentication failure occurs.
IP Restriction Middleware for Hono
This code is based on React. https://github.com/facebook/react MIT License Copyright (c) Meta Platforms, Inc. and affiliates.
React types
JSX Renderer Middleware for hono.
useRequestContext for Hono.
React types
This hook returns the current state and a function to update the state by form action
This hook returns the current form status
This hook returns the current state and a function to update the state optimistically The current state is updated optimistically and then reverted to the original state when all actions are resolved
Create a root object for rendering
Create a root object and hydrate app to the target element. In hono/jsx/dom, hydrate is equivalent to render.
Render JSX element to readable stream.
Render JSX element to string.
Logger Middleware for Hono.
Method Override Middleware for Hono.
Powered By Middleware for Hono.
Pretty JSON Middleware for Hono.
Error message indicating that a route cannot be added because the matcher is already built.
Constant representing all HTTP methods in uppercase.
Constant representing all HTTP methods in lowercase.
Array of supported HTTP methods.
Type representing a map of parameter indices.
Type representing a map of parameters.
Type representing a stash of parameters.
Type representing the result of a route match.
Error class representing an unsupported path error.
Secure Headers Middleware for Hono.
This middleware is not directly used by the user. Create a wrapper specifying getContent()
by the environment such as Deno or Bun.
Service Worker Adapter for Hono.
Adapter for Service Worker
Define SSG Route
Timeout Middleware for Hono.
Append trailing slash middleware for Hono.
Append a trailing slash to the URL if it doesn't have one. For example, /path/to/page
will be redirected to /path/to/page/
.
Trailing Slash Middleware for Hono.
Get whether color change on terminal is enabled or disabled.
If NO_COLOR
environment variable is set, this function returns false
.
StringBuffer contains string and Promise alternately The length of the array will be odd, the odd numbered element will be a string, and the even numbered element will be a Promise. When concatenating into a single string, it must be processed from the tail.
If you want to use an unofficial status, use UnofficialStatusCode
.
UnofficialStatusCode
can be used to specify an unofficial status code.
Utils for IP Addresses
Convert a binary representation of an IPv4 address to a string.
Convert IPv4 to Uint8Array
Convert a binary representation of an IPv6 address to a string.
Convert IPv6 to Uint8Array
Distinct Remote Addr
Expand IPv6 Address
Union types for BaseMime
Useful to flatten the type output to improve type hints shown in editors. And also to transform an interface into a type to aide with assignability.
A simple extension of Simplify that will deeply traverse array elements.
String literal types with auto-completion
Create a WebSocket adapter/helper
Upgrade WebSocket Type
ReadyState for WebSocket