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