title: Express.js get http method in controller
body: <p>I am building a registration form (passport-local as authentication, forms as form helper).</p>
  
  <p>Because the registration only knows GET and POST I would like to do the whole handling in one function.</p>
  
  <p>With other words I am searching after something like:</p>
  
  <pre><code>exports.register = function(req, res){
      if (req.isPost) {
         // do form handling
      }
      res.render('user/registration.html.swig', { form: form.toHTML() });
  };
  </code></pre>