title: Angular 4 HttpModule How to Return a File From Get Request
body: <p>I have a REST API that if I query directly in the browser, it returns a JSON or CSV file to download. I want to do the same thing with the Angular HttpModule.</p>
  
  <p>My get request is simple (it has a query string param to indicate which file format to return):</p>
  
  <pre><code>public Submit(request: Request) {
    ...
    return this.http.get(url).subscribe(response =&gt; {
      //What here
    });
  }
  </code></pre>
  
  <p>The response content-type is <code>application/octet-stream</code>. I've tried processing the response as a blob, which doesn't work. How can I just pass through the response from the server to the browser and let it download the file? This method is part of a service that is being called by a component that is responding to a button click</p>
  
  <pre><code>onClick() {
      this._requestService.Submit(request); //This gets the Subscription response from the service, but I want it to let the broswer download the file
  }
  </code></pre>