title: Capturing POST data with Silex/Bolt
body: <p>I'm trying to create a Bolt extension to be able to login via a REST endpoint. But I can't capture the values from the request.</p>
  
  <pre><code>use Symfony\Component\HttpFoundation\Request;
  use Symfony\Component\HttpFoundation\Response;
  
  public function initialize()
  {
      $this-&gt;app-&gt;post("/rest/session", array($this, 'rest_login'))
                -&gt;bind('rest_login');
  }
  
  public function rest_login(Request $request) {
  
    // Get credentials
    $username = $request-&gt;get('username');
    $password = $request-&gt;get('password');
  
    // Attempt login
    $login = $this-&gt;app['users']-&gt;login($username, $password);
    $response = $this-&gt;app-&gt;json(array('login' =&gt; $login));
    return $response;
  }
  </code></pre>
  
  <p>If I return after getting <code>$username</code> and <code>$password</code> I can see that these are both NULL, even though they have been sent as POST data - how do I capture these values?</p>