title: Angular file download with name from content Content-Disposition
body: <p>I would like to download generated xls file using angular and set the file name according response header Content-Disposition. </p>
  
  <p>I use something like </p>
  
  <pre><code>downloadFile(): Observable&lt;any&gt; {
    var url= "http://somehting";
    return this.http.get(url, { observe: 'response', responseType: 'blob' as 'json' });  
  }
  </code></pre>
  
  <p>and later in my controller:</p>
  
  <pre><code>this.dataService.downloadFile().subscribe(
      data =&gt; {
          this.debug.msg("response:", JSON.stringify(data));
          saveAs(data.body, "test.xlsx");
      },
      err =&gt; {
          console.error(err);
          alert("Problem while downloading the file.\n" + "[" + err.status + "] " + err.statusText);
      }
  );
  </code></pre>
  
  <p>unfortunately the response headers are not set and the body is also empty.</p>
  
  <pre><code>response: {
     "headers":{
        "normalizedNames":{
  
        },
        "lazyUpdate":null
     },
     "status":200,
     "statusText":"OK",
     "url":"http://localhost:4200/MyEndpoint/GetDownload",
     "ok":true,
     "type":4,
     "body":{
  
     }
  }
  </code></pre>
  
  <p>if I change procedure to be responseType: blob, then I am able to get the content of the file but I don't know how to get to <code>response.headers</code>. 
  did I miss something and if it's the case what is it? </p>