location<LoginForm> {
method(
HttpMethod.Post) {
handle<LoginForm> {
log.info { "logging in as $it.username" }
call.respondText(it.toString())
}
}
}
@location("/login")
data class LoginForm(var username: String, var password: String)
and e.g. http --form POST
http://localhost:8081/login username=chillenious results in a 404 because password isn’t given