title: node.js axios download file stream and writeFile
body: <p>i want download a pdf file with <code>axios</code> and save on disk (server side) with <code>fs.writeFile</code>, i have tried:</p>
  
  <pre><code>axios.get('https://xxx/my.pdf', {responseType: 'blob'}).then(response =&gt; {
      fs.writeFile('/temp/my.pdf', response.data, (err) =&gt; {
          if (err) throw err;
          console.log('The file has been saved!');
      });
  });
  </code></pre>
  
  <p>the file is saved but the content is broken... </p>
  
  <p>how do I correctly save the file?</p>