title: Using POST routes parameters in Play Framework
body: <p>I have a login route that should transmit its input parameters as POST variables. I have defined my route like this:</p>
  
  <pre><code>POST    /v1/accounts/login          controllers.v1.Accounts.login(username: String, password: String)
  </code></pre>
  
  <p>and my Controller is like this:</p>
  
  <pre><code>object Accounts extends Controller {
    def login(username: String, password: String) = Action {
      Ok("Foo " + username)
    }
  }
  </code></pre>
  
  <p>When I test this route using Chromes <a href="https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo" rel="noreferrer">Advance REST Client</a> it only works for GET parameters and not if I send it as <code>application/x-www-form-urlencoded</code> POST form data.</p>
  
  <p>The <a href="http://www.playframework.com/documentation/2.2.x/ScalaRouting" rel="noreferrer">Play Framework documentation</a> never actually mentions POST parameters but neither does it say that it does not work.</p>
  
  <p>I think it might get it to work if I create a Form and bind my request to that but that seems needlessly complex.</p>
  
  <p>Is there really no way to bind POST parameters using the routes file?</p>