title: Piping the json body only with requirejs
body: <p>So I started using <code>requestjs</code> which I am happy with, but I wonder if there is some way to pipe in a fashion, like you would do with promises:</p>
  
  <pre><code>function foo(url) {
    return request({ "url": url, "json": true })
  }
  let result = foo("https://jsonplaceholder.typicode.com/posts/1")
  result.pipe(process.stdout)
  result.on('data', console.log)
  </code></pre>
  
  <ul>
  <li>with <code>pipe</code> I can't access the object itself, so I can't only stream the body</li>
  <li>and on doesn't respect my specification to parse the response to json</li>
  </ul>
  
  <p>So I can't use any of those to only access the json I receive. Of course I can use <code>JSON.parse</code>, but I'm looking for some easier way to operate on the response (similar to promises) and I feel like I'm missing the big picture.</p>