title: Downloading file via REST API web method
body: <p>I have a REST API developed in node js. One of my routes downloads a file and i am able to download the file too. But i am also trying to retain the actual file name when sending across. I have set the appropriate headers too. </p>
  
  <p>My route is </p>
  
  <pre><code>http://localhost/v1/tests/myfile
  </code></pre>
  
  <p>And I have set the following headers,</p>
  
  <pre><code>{ 
  
   'Content-Type': 'application/text', 
  
   'Content-Length': stat.size, 
  
   'Content-Disposition': 'attachment',
  
   'filename': 'sample.txt'
  
  }
  </code></pre>
  
  <p>When I access the route in Chrome or Firefox, the file is downloading as <strong>myfile</strong>. Why is this happening and how do i retain my file name?</p>