title: How do I get Node.js request type?
body: <p>I was trying to figure out how to get the request type from a node request. I want to perform different tasks based on the type. </p>
  
  <pre><code>module.exports = function(req, resp, next){
      if (req.type == 'GET'){
          //Do something
      }else{
          // Do else something
      }
  }
  </code></pre>