title: Processing Batch REST API requests in NodeJS Express framework
body: <p>I am trying to implement batch API for my application, and the client can send a send a set of request to server and expects a single response back.</p>
  
  <p>Using Express framework in my MEAN stack app. I have created a batch API resource that receives this from client and should act as per the URL mentioned in each part of the request.</p>
  
  <p>Sample Request Body:</p>
  
  <pre><code>{
      "batchID": "abc123",
      "batchReq": [{
          "id": "1",
          "url": "/api/schoolm/students",
          "method": "GET",
          "value": null
      }, {
          "id": "2",
          "url": "/api/schoolm/teachers",
          "method": "POST",
          "value": {
              "name": "Teacher1",
              "age": 34
          }
      }]
  }
  </code></pre>
  
  <p>This is sent to /api/schoolm/batch</p>
  
  <p>How can I redirect the requests each from inside the batch controller to their respective API?</p>