title: Http failure during parsing for http... while downloading pdf file
body: <p>I am new to angular and I have been struggling to figure out how to download a file, in my case a pdf file.
  This is the error I get:</p>
  
  <pre><code>Http failure during parsing for https://url...
  </code></pre>
  
  <p>In the debug console of the browser the is also an error:</p>
  
  <pre><code>SyntaxError: Unexpected token % in JSON at position 0 at JSON.parse
  </code></pre>
  
  <p>Actually I am downloading a pdf file. Here is how my http call looks like:</p>
  
  <pre><code>  protected get&lt;T&gt;(url: string, params: any, defaultResult: T): Observable&lt;T&gt; {
      return this.httpClient.get&lt;T&gt;(url, {
      headers: myHeader,
      params: params
  })
    .pipe(catchError(this.handleError(defaultResult))
    );
  </code></pre>
  
  <p>}
  How </p>