title: React direct to external NodeJS route and display data from processed body
body: <p>i have this fetch request which send some body data to <code>http://localhost:8000/report</code> and then redirects to the same route on server to display data after processing :</p>
  <pre><code>  const handleGo = async () =&gt; {
      const employee = {
        name: name.current.value,
        month: month.current.value,
        year: year.current.value,
      };
      await fetch(&quot;http://localhost:8000/report&quot;, {
        method: &quot;POST&quot;,
        headers: {
          &quot;Content-type&quot;: &quot;application/json&quot;,
        },
        body: JSON.stringify(employee),
      });
      window.location.replace(&quot;http://localhost:8000/report&quot;);
    };
  
  </code></pre>
  <p><code>index.js</code>on server</p>
  <pre><code>const client = require(&quot;@jsreport/nodejs-client&quot;)(&quot;http://localhost:8001&quot;);
  
  app.post(&quot;/report&quot;, (req, res, next) =&gt; {
    employee.getEmpReport(req, res, next, client);
  });
  </code></pre>
  <p>function <code>getEmpReport</code></p>
  <pre><code>const getEmpReport = async (req, res, next, client) =&gt; {
    const { name, month, year } = req.body; /// processing body data coming from react client
  
    Employee.aggregate([
       // doing some MongoDB join with conditions and returning results
  
    ]).exec(function (err, employee) {
  
      const dataObject = {
           /// setting some data from returned employee
      };
      client
        .render({
          template: { name: &quot;/salary/salarySlipTemplate&quot; },
          data: dataObject,
          options: { reports: { save: true } },
        })
        .then((response) =&gt; response.pipe(res))
        .catch(next);
    });
  };
  </code></pre>
  <p>i want this route to process data and then display data after processing, but when <code>window.location.replace(&quot;http://localhost:8000/report&quot;);</code> redirects to the route it says <code>cannot get /report</code></p>
  <p>i think i need a <code>get</code> route but then how can i recieve body data ? i want to be able to recieve the data from client and display it at the same time, how can i do that ?</p>