title: Does the Node.js "request" library support an async-iterable response stream?
body: <p>I'm somewhat new to Node.js libraries and I'm trying figure how to use async iteration over an HTTP response stream.  My overall goal is to read a large response stream and process it as chunks arrive, currently via a generator function.  I cannot store the entire response in memory for processing.</p>
  
  <p>I'm using the <code>request</code> library to execute the HTTP request as follows.</p>
  
  <pre><code>const request = require("request");
  
  // contrived chunk-by-chunk stream processing 
  async function* getChunks(stream) {
    for await (const chunk of stream) {
      yield chunk[0];
    }
  }
  
  async function doWork() {
    var response = request.get("https://pastebin.com/raw/x4Nn0Tby");
    for await (c of getChunks(response)) {
      console.log(c);
    }
  }
  </code></pre>
  
  <p>When I run <code>doWork()</code>, I get an error stating that the <code>stream</code> variable of <code>getChunks()</code> is not async-iterable.</p>
  
  <p><em>TypeError: stream is not async iterable</em></p>
  
  <p>This is surprising, as I thought that all readable-streams are generally async-iterable, and that the request library returns a stream when no callback is provided.  When I replace <code>request.get(...)</code> with <code>fs.createReadStream(...)</code> to some local file, all works as expected.</p>
  
  <p>Perhaps the <code>request</code> library doesn't support this.  If so, what do I need to do to process HTTP response streams via async-iteration?</p>
  
  <p>Using Node.js 11.13 and <code>request</code> 2.88.0.</p>