--- a/progs/app1.scala Mon Sep 23 17:39:31 2013 +0100
+++ b/progs/app1.scala Mon Sep 23 22:23:55 2013 +0100
@@ -15,11 +15,10 @@
// POST data: processing the login data
val receive = Action { request =>
- val form_data = Form (tuple ("login" -> text, "password" -> text))
-
- val (login, password) = form_data.bindFromRequest()(request).get
+ val form_data = Form(tuple ("login" -> text, "password" -> text))
+ def (login, passwd) = form_data.bindFromRequest()(request).get
- Ok("Received login: " + login + " and password: " + password)
+ Ok(s"Received login: $login and password: $passwd")
}
}