annotation

Kemal::Controller::Get

Annotation to define a Get route for a controller method.

Parameters

  • path : String - The URL path for the route (can include path parameters like :id)
  • auth : Bool - If true, requires authentication via authenticate! method (default: false). Must be set explicitly when compiled with the kemal_controller_require_auth flag.
  • strip : Bool | Array(Symbol) - If true, strips all parameters; if array, strips only specified parameters (default: false)
  • status : Int32 - The HTTP status code to set before the action runs (default: 200)
  • as : Symbol - The name of the route's URL helper in Kemal::Routes (default: {controller}_{action})

See Kemal::Controller documentation for usage examples.