title: Issues with nodejs' request and pipe
body: <p>I'm having an issue with the following code. I'm trying to make a POST request (json) to a URL using pipe but I get the error "write after end" - Internal Server Error. Can someone please help?</p>
  
  <pre><code>test: function( req, res, next) {
   var requesty = request.post({
              url: dataUrl,
              headers: {
                  'Content-Type': 'application/json'
              },
              body: JSON.stringify(body)
          });
          req.pipe(requesty).on('error', function (error) {
              logger.withRequestLog(res, 'error', 'CC Melville Proxy failed!', {
                  assetUrl: dataUrl,
                  error: error,
              });
              next(error);
          }).pipe(res);
  }
  </code></pre>