Rectangle 27 0

If you know all parameters you can create form mapping and use fold method to get all values. It works with a GET method as well. In this case it would look like this

Case class for holding url params with form mapping:


case class UrlForm(email: String, firstName: String, lastName: String)

object UrlForm {
  val form = Form[UrlForm](
      "email" -> text,
      "first-name" -> text,
      "last-name" -> text
object UrlController {
  def widget() = Action { implicit request =>
        formWithErrors => // validation errors
        urlForm =>; urlForm.lastName //etc.

Notice that you are able to map url params to any type you want. String is just an example.

scala - play framework get parameter in url with dash - Stack Overflow

scala url playframework playframework-2.0