title: koa.js streaming response from remote url
body: <p>I want to create a <code>koa</code> route that acts like a proxy for another url, which delivers a file that is usually a few dozens of Megabytes.</p>
  
  <p>Therefore I would like not to block when making the response. I am using <code>this.body = yield request.get(url);</code> currently, where request is the <code>[co-request</code>]<a href="https://www.npmjs.com/package/co-request" rel="noreferrer">1</a> module.</p>
  
  <p>How do I stream the response back to the client ?</p>
  
  <p><em>Edit :</em> </p>
  
  <p>I am now doing the following :</p>
  
  <pre><code>var req = require('request');
  //...
  this.body = req(url).pipe(fs.createWriteStream(this.params.what));
  </code></pre>
  
  <p>If I paste the <code>url</code> in my browser, I get a file just fine.
  However if I get a <code>Error: Cannot pipe. Not readable.</code> in my route.</p>