annotation Athena::Routing::Annotations::RequestParam
Overview
Represents a form data request parameter.
See ARTA::QueryParam
for configuration options/arguments.
NOTE The entire request body is consumed to parse the form data.
class ExampleController < ART::Controller
@[ARTA::Post(path: "/login")]
@[ARTA::RequestParam("username")]
@[ARTA::RequestParam("password")]
def login(username : String, password : String) : Nil
# ...
end
end
ART.run
# POST /login, body: "username=George&password=abc123"