HTTP

Routes, parameters, validation, headers, middleware, and CORS.

  • Define a Route

    Bind methods to HTTP routes with @HttpService and @HttpRoute, and control the response.

  • Read Request Parameters

    Pull path segments and query parameters into typed handler arguments.

  • Validate Request Bodies

    Deserialize JSON bodies into typed, validated classes, or take the raw body when you need it.

  • Headers and Cookies

    Read request headers and cookies as handler arguments; set them on responses.

  • Middleware

    Run code before handlers (globally or per route) and pass typed values through the RequestContext.

  • CORS

    Configure cross-origin access with an explicit allowlist, per environment.