title: How to call PUT router from POST router in Node.js Express?
body: <p>In Node/express I have a <code>POST</code> request that if it contains an <code>id</code> I would like it to call the <code>PUT</code> method instead. No redirect, just how to call the put method from the post method?</p>
  
  <pre><code>router.put('/:id', function(req, res) {
    // code ...
  });
  
  router.post('/:id?', function(req, res) {
    if (req.params.id) {
      // call PUT method
    }
  });
  </code></pre>
  
  <p>I don't want to do a redirect, just make it as if it was part of the current request.</p>