Server requests
Follow one request from the gateway to a typed response.
2 min read
Updated 2026-08-12
#server#hono#requests
The gateway forwards a request to the application. The application's Hono router then owns the request.
Cloud supplies public middleware, identity types, validators, and response helpers, but it does not own the application's route tree or domain service. This keeps transport integration consistent without coupling domain behavior to the platform repository.
Request path
| Layer | Responsibility |
|---|---|
| Gateway | Forward the original path to the registered service |
| App middleware | Load request context and apply transport policies |
| Route policy | Require an accepted caller or role |
| Validator | Convert untrusted input into typed values |
| Domain service | Check resource access and run business rules |
| Response helper | Convert Result<T> into JSON and a status code |
Authentication protects the route. The service still decides whether the caller may read that item.
Continue by task
| Task | Page |
|---|---|
| Mount middleware and choose the request context | Request middleware |
| Validate input and expose a typed endpoint | Typed HTTP APIs |
| Keep transport code separate from domain rules | Services and Result |
| Build stable list endpoints | Pagination and filtering |
| Declare the paths the gateway may forward | Routes and discovery |
| Identify callers and enforce access | Identity and access |