title: how to get mime type from content-type
body: <p>The thing is axios calls return files. sometimes xlsx, sometimes plain txt.</p>
  
  <p>In javascript, as soon as I get them, i force download it via blob.</p>
  
  <p>Something like this:</p>
  
  <pre><code>var headers = response.headers;
  var blob = new Blob([response.data], {
      type: headers['content-type']
  });
  var link = document.createElement('a');
  link.href = window.URL.createObjectURL(blob);
  link.download = "report.xlsx";
  link.click();
  </code></pre>
  
  <p>As you see, I got something like this: <code>link.download = "report.xlsx"</code> . What I want is to replace <strong>xlsx</strong> with dynamic mime type so that sometimes it's <strong>report.txt</strong> and sometimes it's <strong>report.xlsx</strong>.</p>
  
  <p>How do I do that from content-type?</p>