title: Is there any way to pipe request body only in express?
body: <p>In my project there are 2 web servers, one is nodejs to serving the requests from frontend (authentication, acl control, ...), while another one is a Java stateless sever for the real work.</p>
  
  <p>The nodejs server needs to foward a file upload (multipart/form-data) request to the backend java server. I'm trying to pipe the raw uploaded file data by <code>request</code> module.</p>
  
  <pre class="lang-js prettyprint-override"><code>app.post('/file/upload', function(req, res, next) {
    req.pipe(request.post('http://java-server/file/upload', function(err, resp, body) {
      if (err) { return next(err); }
      res.json(body);
    }));
  });
  </code></pre>
  
  <p>The question is I'm piping the whole request (including headers) instead of just body data. I can't find any method to get something like <code>req.body.stream()</code> so I can directly pipe the uploaded file. </p>
  
  <p>This way I can't insert additional headers such as <code>Authorization</code> which are required by the java server.</p>
  
  <p>Anyone helps? Thanks.</p>