title: Send a POST request on the server with Express.js
body: <p>I'm running into a small issue with something I thought was possible.</p>
  
  <p>I want to have two express routes, one <code>GET</code> route <code>/post-data</code> and one <code>POST</code> route <code>/post-recieve</code>.</p>
  
  <p>The code would look something like this:</p>
  
  <pre><code>app.get('/post-data', (req, res, next) =&gt; { 
    //set url to '/post-recieve' and set body / headers
  })  
  
  app.post('/post-recieve', (req, res, next) =&gt; {
    return res.json(res.body)
  })
  </code></pre>
  
  <p>Now, when you visit <code>/post-data</code> you should be instantly redirected to <code>/post-recieve</code> except if you look in the developer console you should see that the method for the document is <code>POST</code> and not a normal <code>GET</code> request.</p>
  
  <p>Is this possible? </p>
  
  <p>I know you can use a library like <code>request</code> to make a HTTP post request to an endpoint, but I'm talking about actually sending the user to the page via a <code>POST</code> request.</p>