title: Axios error: ... .data.pipe is not a function
body: <p>So I am basically trying to use axios to download a image from a url, but I get this error:</p>
  <p><code>TypeError: streamResponse.data.pipe is not a function</code></p>
  <p>My function for doing this image download is below (<em>note that this is inside a class</em>):</p>
  <pre><code>/**
   * Download poster
   */
  async downloadPoster() {
  
      // Writer stream where we want to download the poster image
      const writer = fs.createWriteStream(this.poster.file);
  
      // This grabs the second part of the image url that we want
      const resultsResponse = await axios({
          url: this.poster.url,
          method: 'GET',
          responseType: 'json',
          adapter: httpAdapter
      });
  
      // Zero results
      if (resultsResponse.data.total_results &lt;= 0) {
          logger.log(language[Config.language].posterNotFound + this.movie.title, 'error');
          return false;
      }
  
      // Create the poster download URL
      var posterDownloadUrl = new URL(Config.api.posterUrl + resultsResponse.data.results[0].poster_path);
  
      const streamResponse = await axios({
          url: posterDownloadUrl,
          method: 'GET',
          responseType: 'stream',
          adapter: xhrAdapter
      });
  
      // Write data
      streamResponse.data.pipe(writer);
  
      return new Promise((resolve, reject) =&gt; {
          writer.on('finish', resolve);
          writer.on('error', reject);
      });
  
  }
  </code></pre>
  <p>I assume that the adapter for a stream response is the xhr one. Anyways, I have tried both adapters and both gives the exact same error. Both requests does happen though (I can see them in the devtools).</p>
  <p>And so there's no confusion, I have the adapters imported at the top of the file:</p>
  <p><code>const httpAdapter = require('axios/lib/adapters/http');</code><br>
  <code>const xhrAdapter = require('axios/lib/adapters/xhr');</code></p>
  <p>What could I be doing wrong here?</p>